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

Cycling through Records 1

Status
Not open for further replies.

iXPhound

Technical User
Feb 25, 2001
146
US
Hi all, have a quick question. I have a continous form. I would like to cycle through all the records in this form, find out if txtShift.value = "A". If it does, I would like to have my checkbox, chkRDO.Value = True. So far I can get this to work on the initial record when the code is placed in Form_Load, however it stops at the first record. What should I do to have the code cycle through all of the records and check the value of txtShift? TIA!
 
Rather then having it manually scroll through records, what if you ran an update query onLoad. You could either build the query and save it, or, run an sql command via vba.

If you want it to go seamless without any prompting, before you fire the query.

DoCmd.SetWarnings (False)
'Code to run update query
DoCmd.SetWarnings (True)

Always remember, when turning off warnings, to turn back on immediatly after! As this will stay in effect throughout the entire use of the dbase

HTH :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top