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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Position cursor on datasheet in a different form

Status
Not open for further replies.

jadixon

Programmer
May 22, 2008
33
US
I have a form that lists information in datasheet view. The user can click on a record to copy it via a different form. After the user enters the data and closes the form, I need to requery the datasheet view (not a problem) and leave the cursor where the user left it. I have tried AbsolutePosition and SelTop, but I get errors that I can't to that in another form. Currently, my code looks like:

Forms!form72a!Form72.Requery
Forms!form72a!Form72.SetFocus
Forms!form72a!Form72.SelTop = lngCurrentPos

When I get to SelTop, the error reads:

Object doesn't support this property or method

How do I get this to work?
 
What about this ?
Forms!form72a!Form72[!].Form[/!].SelTop = lngCurrentPos

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks! I found that while searching the internet at the same time you replied. It is too bad that it takes a bit of coding to get the scroll bars to move along with the positioning. Oh well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top