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

Easy question, but I'm brain dead - looping through records

Status
Not open for further replies.

tweaked2005

Technical User
Jun 21, 2005
20
US
So I'm trying to apply the following conditional code to each record in the dataset that is loading in my form. I know I need to loop through each record, but I can't remember the code necessary to do so (is it something like recordset.EOF). Any help on looping through records is greatly appreciated! Thanks!

Private Sub Form_Open(Cancel As Integer)
If today - Me!startDate < 45 Then newComment = "Too New"
End Sub
 
I think you would be better off adding the code to a textbox, rather than updating a field with data that will be out-of-date tomorrow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top