How to Requery a form without losing the current record

G

Guest

Hello

i have a main form which looks at all my records. another seperate form, not
a subform, can create new records in my main data for the first form. the
problem is that the main form doesnt update with the new records unless i
requery it. when i do that the main form moves to the first record.

i want it to stay on the record i was viewing last.

how?
 
J

John W. Vinson

Hello

i have a main form which looks at all my records. another seperate form, not
a subform, can create new records in my main data for the first form. the
problem is that the main form doesnt update with the new records unless i
requery it. when i do that the main form moves to the first record.

i want it to stay on the record i was viewing last.

how?

You'll need to store the Primary Key value of the current record in a VBA
variable, and use code to navigate to that record after the Requery.

John W. Vinson [MVP]
 
G

Guest

Hello

so basically i would have to use the code to do the same as a find record
combo box, but using a variable i designate. great, thanks for the help. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top