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

move through records in a datasheet subform 1

Status
Not open for further replies.

stkarma

Technical User
Oct 3, 2001
31
US
What is the correct way to move through records in a datasheet subform to set the value of a field? (use setfocus & gotorecord OR do loop method OR ?). Please give sample code. Thanks!
 
MoveFirst, MoveLast, MoveNext, or MovePrevious method.
Check these out and see if they help you out....look in your help for these methods.
 
I setfocus to subform & used gotorecord last record then loop to previous record. Once it reaches the first record, there is no previous record. So I have on error, exit sub.

In order to use movenext, movefirst, etc I have to reference a recordset. The form is already designed to bring in matching records into a datasheet subform.

Wondering if there is a better way than gotorecord command I used above.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top