Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2003
    Posts
    11

    Red face Unanswered: Last record selction

    Can someone please tell me how I can select the last record entered to reuse again in another form?

    Records that are entered are automatically put in ascending order in the backend table by it's unique CustomerID(primary key). I have multiple forms that use that CustomerID to enter more relevant data. But everytime the next form is open, I have to re-search the CustomerID from the records.

    Please help
    Sunny

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Re: Last record selction

    Originally posted by ThetHtooZaw
    Can someone please tell me how I can select the last record entered to reuse again in another form?

    Records that are entered are automatically put in ascending order in the backend table by it's unique CustomerID(primary key). I have multiple forms that use that CustomerID to enter more relevant data. But everytime the next form is open, I have to re-search the CustomerID from the records.

    Please help
    If you want to go to the last record enterd when opening a form just put in its Open event this code:

    DoCmd.GoToRecord , , acLast

  3. #3
    Join Date
    Nov 2003
    Posts
    11

    Smile

    I will try that. Thank you very much
    Sunny

  4. #4
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Originally posted by ThetHtooZaw
    I will try that. Thank you very much

    When you bring up the last record entered and re-enter new data, won't that delete or cancel out the previous information when you save it again????
    Bud

  5. #5
    Join Date
    Nov 2003
    Posts
    28

    Re: Last record selction

    Originally posted by ThetHtooZaw
    Can someone please tell me how I can select the last record entered to reuse again in another form?

    Records that are entered are automatically put in ascending order in the backend table by it's unique CustomerID(primary key). I have multiple forms that use that CustomerID to enter more relevant data. But everytime the next form is open, I have to re-search the CustomerID from the records.

    Please help
    I think you should use global variable to keep the last CustomerID you entered. And when you open the relevant form, if press some special key, that ID will paste into Customer ID field.

    HTH

  6. #6
    Join Date
    Nov 2003
    Posts
    11

    Post

    Originally posted by Bud
    When you bring up the last record entered and re-enter new data, won't that delete or cancel out the previous information when you save it again????
    Bud
    I have about 20 forms that are linked to the CustomerID. When switched from one form to another, the CustomerID is still available in the records but it's been automatically put into ascending order so everytime I click the new form, I have to research the CustomerID in the list, it doesn't bring up the last CustomerID that I've entered in the previous form. I will have 2000+ IDs coming in and it will be hectic for the data entryers to keep searching the same CustomerID everytime they go to new forms.
    Sunny

  7. #7
    Join Date
    Nov 2003
    Posts
    11

    Re: Last record selction

    Originally posted by suntisuk
    I think you should use global variable to keep the last CustomerID you entered. And when you open the relevant form, if press some special key, that ID will paste into Customer ID field.

    HTH
    I did use such technique for linking the CustomerID to the forms. The problem is that it keep putting itself in ascending order since I have it as a primary key. I was wondering if there's another way to go to the next forms w/o searching again for the CustomerID. Thanks for you idea.
    Sunny

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •