Return to same record after form requery

B

BLW

I have a form for injury claims. When I click a button to close the claim,
the form needs to requery to update all the closed claim information. When I
requery, it brings me back to the first record instead of the one I was
working on.

How do I get it to automatically return to the same record?

BLW
 
F

fredg

I have a form for injury claims. When I click a button to close the claim,
the form needs to requery to update all the closed claim information. When I
requery, it brings me back to the first record instead of the one I was
working on.

How do I get it to automatically return to the same record?

BLW

Let's assume ID is the name of the record's prime key field.

Dim MyId As Long
MyId = Me.ID
Me.Requery
Me.ID.SetFocus
DoCmd.FindRecord MyId, acEntire, , acSearchAll, , acCurrent
 

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