How do I loop through all the records in a query to check if conditions are met
please. This is the code that I have right now, it checks to see if there are
any records in the query and then I need it to check to see that
Me.AnalystAttended is not an empty field and I need it to do that for each of
the records.
I would really appreciate some
help on this, I know I need to do a loop, I've read some posts on looping but I
cant get my head around it. Thanks
Code:
Private Sub Command203_Click()
Dim OpenRecordCheck As Integer
OpenRecordCheck = DCount("[ExID]", "[Technical_Incident _Report Query]", "[Fault_Rectified] = False")
If OpenRecordCheck > 0 Then
If IsNull(Me.AnalystAttended) Then
MsgBox "You must first select an Analyst", vbOKOnly
Next
Else
MsgBox (OpenRecordCheck)
End If
End Sub