Results 1 to 2 of 2
  1. #1
    markjkubicki's Avatar
    markjkubicki is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    496

    capture current bookmark before moving to the next record

    I have a single record form with command buttons for gotofirst, previous, next, and last, as well as a list box from which the user canpick a specific record to go to.
    I'd like to add a button that allows them to return tothe previous record that they were at... To do this, I need to trap what that record was before I move on to thenext one; which is where I'm having problems. I can't figure out where it could be caught .



    I have a public variable to store the primary fieldvalue, which is the reference I would use in a search to return to that record,and have tried assigning it in various places.
    The most recent is on the buttondown event of the goto... command buttons thinking I could save the value of the current recordbefore moving to the next... This seemedpromising, but for some reason, code at this event is disabling the button'spreviously working click event, or at least it seems so....!?! So my presumption is that this is not the right place to be....

    Putting the code at the form current event was another thought, except that as soon as I move to the next record, the variable is overwritten with "where we are now" at (vs. "where we were...")

    Any suggestions will be greatly appreciated in advannce,
    Mark


  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    If I understand you correctly, save the value to the variable in the OnClick event of each navigation button, before any code to actually move to another Record.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 09-19-2012, 07:34 AM
  2. Moving a record.
    By Cutter596 in forum Queries
    Replies: 1
    Last Post: 08-02-2011, 02:49 PM
  3. Move bookmark to "new" record
    By BayerMeister in forum Forms
    Replies: 9
    Last Post: 08-17-2010, 05:16 AM
  4. Opening form to correct record. Bookmark?
    By stephenaa5 in forum Forms
    Replies: 11
    Last Post: 12-29-2009, 02:43 PM
  5. Bookmark a record in a Form?
    By westcoastbmx in forum Forms
    Replies: 3
    Last Post: 10-29-2009, 03:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums