Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    Paul1 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    50

    OK thanks I now understand that point and I have removed that line of code. Only when I click the move previous button from any position in the recordset which runs the line rst.MovePrevious, it is not moving back only one record rather it is moving to BOF and displaying the first record which is still a problem.

  2. #17
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Ah, I forgot you have 2 recordsets. Why is that? The problem is you aren't moving rst to the record the form was opened on. Instead of setting that variable in the open event, move rst to that record:

    rst.FindFirst "[User ID] = " & mlngUserID
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #18
    Paul1 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    50

    Smile

    Great it works now - problem solved. I was fixated on using bookmarks and didn't think to move to the correct position in the recordset.
    BTW, there are 2 recordsets: rst to navigate the whole table and rst2 to open the form to the specific record.
    Many thanks for all your help and patience.

  4. #19
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problem. I don't see the need for the second recordset. With the line above, you've moved rst to that desired record and can use that to put values on the form. Plus you're doing a lot of work to avoid a bound form
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #20
    Paul1 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    50
    Thanks you are right about not needing the second recordset.


    I have a question about using bound forms. I'm not completely clear about how to use the local table and append the data to the real table. I would need the form to be bound to the real table to be able view all the records in the recordset. However when I enter data into the form I would want to change the recordsource to the local table. I suppose that this is a case of using 2 recordsets? Do you know of any code examples or sample databases that demonstrate how to do it?

  6. #21
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Well, you've already done the work so I might just leave it alone at this point. I don't have a sample, but yes you could change the record source of the form programmatically. You could use the AddNew method of a recordset to save a new record, or an append query.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Navigate attachment using buttons on form
    By saleemsadique in forum Access
    Replies: 2
    Last Post: 02-18-2014, 03:15 PM
  2. Replies: 11
    Last Post: 04-05-2013, 11:35 AM
  3. Replies: 5
    Last Post: 01-27-2013, 06:04 PM
  4. Buttons on form to navigate through records
    By emilyrogers in forum Forms
    Replies: 2
    Last Post: 07-19-2011, 10:17 AM
  5. Replies: 2
    Last Post: 03-25-2010, 12:11 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