Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Mar 2001
    Location
    Atlanta, Georgia, USA
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Maintaining a stack of previous records (Access 2000, SP1)

    I've been asked to add a button to a form that is a 'Back to previous customer' function. When pressed, it will display the last form that was viewed. I have a primary key that is an autonumber, so performing a query to get the record is no big deal, but I had hoped that it would have been as simple as a DoCmd, but that doesn't seem to be the case. I have no problem maintaining an array to hold the list of autonumbers, so it seems to be just a matter of decrementing my 'stack' pointer to the previous autonumber, do a query, then repopulating the form. Am I off track here?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Maintaining a stack of previous records (Access 2000, SP1)

    If your form is bound, you don't need to run a query, you can use the standard technique for locating a record in a form: perform a FindFirst on a clone of the form's recordset, then set the bookmark of the form to the bookmark of the recordset.

    An array of previously viewed Primary Keys is fine, but you might also consider using a collection.

Posting Permissions

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