Cursor Postion after form Requery

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
Private Sub Form_AfterUpdate()
Me.Requery
DoCmd.GoToRecord , , acNewRec
End Sub

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
Back
Top