Jeremy Campbell
asked on
How to loop through records and select matching record in access form vba?
I just need to be able to loop through the records of a query and if they meet the criteria then select the record on the form and unhide the form.
Here is what I'm thinking the code may look like based on some googling;
Private Sub Form_Timer()
Me.Requery
<<Loop code here ....if fOSUserName() = Me.UserName Then (need to incorporate this criteria)>>
Me.Form.Visible = True
End If
End Sub
I have looked up loops through google but really am not sure exactly how to set it up.. The forms datasource is the source that needs be looped through.. [qryNotifications]
Thanks a ton for the help!
Here is what I'm thinking the code may look like based on some googling;
Private Sub Form_Timer()
Me.Requery
<<Loop code here ....if fOSUserName() = Me.UserName Then (need to incorporate this criteria)>>
Me.Form.Visible = True
End If
End Sub
I have looked up loops through google but really am not sure exactly how to set it up.. The forms datasource is the source that needs be looped through.. [qryNotifications]
Thanks a ton for the help!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER