vba iif statement

soldat452002

Registered User.
Local time
Today, 15:37
Joined
Dec 4, 2012
Messages
50
hello,

Here is my code, I have a check box "Complete" that when selected i want only those records where the Complete field (check box) is True..if else only those completed field is False..How do I use this in VBA?

Also I have several conditions on the tblUsers that I want to show on my check box.

iif([STATUS]='Passed' AND [CERT]='Passed' AND [City]='CA' WHERE [COMPLETE]=TRUE



Private Sub ChkComplete_Click()
If ChkComplete = True Then
ShowComplete
Else
ShowPending
End If
End Sub

Private Sub ShowComplete()


Dim strSQL As String

strSQL = "SELECT * tblUsers WHERE tblUsers.[Completed]= True ORDER BY useridID;"

subfrmLicense.Form.RecordSource = strSQL
subfrmLicense.Form.Requery

End Sub



Private Sub ShowPending()

End Sub

Dim strSQL As String

strSQL = "SELECT * tblUsers WHERE Completed = False ORDER BY useridID;"

subfrmLicenseUpdates.Form.RecordSource = strSQL
subfrmLicenseUpdates.Form.Requery

End Sub
 

Users who are viewing this thread

Back
Top Bottom