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

requery and cursor position on datasheet view

Status
Not open for further replies.

psaaccess

Programmer
Apr 14, 2008
18
I'm trying to get code or setting on the cursor stay original position.
Each time when I update a record into my form, I need to run a Requery . But after the Requery runs, the record has goes to the first record of the sub form and I need to search for the record to continue.

Are there anyway the cursor can stay on where I clickd on the data sheet after I requery the form?
I have mainform and subform datasheet view on th main form. I click one of the record on datasheet it will open that record details after i update I click close button(I wrote on click event procedure below code.

My code is
dim varbkm as variant
[forms]![formmain]![sfrmname].requry
varbkm = [forms]![frmmain]![sfmname]!recordset!bookmark
[forms]![sfrmnam].recordset.bookmark = varbkm

Plase help me its urgent.

Thanks for your help.



 
it will open that record details
Could you please post the code doing that ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Anyway you may try the Refresh method instead of the Requery.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top