Check Conditions Are Met

ddrew

seasoned user
Local time
Today, 22:50
Joined
Jan 26, 2003
Messages
911
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
 
Last edited:
I could really use some help on this guys, I know I need a loop and have read some stuff but I just dont understand it. Thanks
 

Users who are viewing this thread

Back
Top Bottom