Cursor Postion after form Requery

G

GingerVA

After researching the forums I found an answer regarding how to requery a
form using the following code:

Private Sub Form_AfterUpdate()
Dim lngpos As Integer
lngpos = Me.Recordset.AbsolutePosition
Me.Requery
Me.Recordset.AbsolutePosition = lngpos

End Sub

However, I do not want the cursor to stay with the record being updated. I
would like for it to move to a new record.

Any suggestions on how to rewrite the above code to accomplish this?

Thanks!
 
M

missinglinq via AccessMonster.com

Private Sub Form_AfterUpdate()
Me.Requery
DoCmd.GoToRecord , , acNewRec
End Sub
 

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