SetFocus to specific row of datasheet?

treva26

Registered User.
Local time
Today, 01:01
Joined
Sep 19, 2007
Messages
113
I have a subform in datasheet view.
On it I have an AfterUpdate vba sub, which includes a Me.Form.Requery command.

The problem is this makes the cursor jump to the top left field of the table.
I can make it go to the top of the column in question with Me.Quantity.SetFocus

But is it possible to SetFocus to the row that it was in before the Requery?
 
Just do this:
Code:
Dim strBookmark As String

strBookmark = Me.Recordset.Bookmark
Me.Requery
Me.Recordset.Bookmark = strBookmark
 
Beautiful thank you :)
 
GladWeCouldHelp.png
 

Users who are viewing this thread

Back
Top Bottom