Check Box State

Ste4en

Registered User.
Local time
Today, 20:52
Joined
Sep 19, 2001
Messages
142
If the check box is null (grey) - the default value, I do not want to include it is the sql statement. If I use the code below I get the error 94 Invalid use of null. How else can I exclude this ststement is the check box is grey.

thanks

Code:
 If CheckStaged Then
    strWHERE = strWHERE & " AND s.Staged =  " & CheckStaged
End If
 
0 = False/No, -1 = True/Yes

If CheckStaged = 0 Then
strWHERE = strWHERE & " AND s.Staged = " & CheckStaged
End If

OR

If IsNull(CheckStaged) or CheckStaged = "" Then
strWHERE = strWHERE & " AND s.Staged = " & CheckStaged
End If
 
thanks, IsNull(check) worked for me.
 

Users who are viewing this thread

Back
Top Bottom