Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select record on datasheet

Status
Not open for further replies.

fiep

Technical User
Sep 2, 2003
66
NL
Hi,

I have this datasheet view on a form. The user doubleclicks on the form and a pop-up form shows the details of the selected record. After closing the pop-up I requery the datasheet so the changed details are visible.

So far no problem BUT requiring places the focus on the first record in the datasheet. I would like to place the focus on the last selected record (the one that was edited).

How do I jump to record in a datasheet form?

Thanks,

W.
 
Store the datasheet form's Bookmark property in a variable before opening the popup form (I believe it's actually a dialog form). Use the variable to retrieve that record after the dialog form is closed:

Dim varBkm As Variant

varBkm = Me.Bookmark
'do your stuff
Me.Bookmark = varBkm

Another way would be to store the primary key information for the record, if that is available, then use FindFirst to get it back.

HTH




[pipe]
Daniel Vlas
Systems Consultant

 
Tried it and it works. Perfect.
Thanks for the quick reply.
I tried the findfirst option earlier and could not get is to work.

W.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top