Code to Filter by Null

lovett10

Registered User.
Local time
Today, 08:58
Joined
Dec 1, 2011
Messages
150
I have some code. I want it to filter the Total Hours Worked column by Null.(show only the fields that hae nothing in tat column)

Here is my code

Code:
    ElseIf Me.chkIncompleted = True Then
         strFilter = "[Total Travel Time] = Is Null"
            Debug.Print strFilter
                    DoCmd.Close
        DoCmd.OpenReport "VisitSheetTableReport", acViewReport, , strFilter

the error i get is:
Run-time error '3075':

Syntax error (missing operator_ in query expression '[Total Travel Time] = Is Null'.

Thanks for any help in advance
 
Should it not just be = Null rather than = Is Null
 
It should be:

strFilter = "[Total Travel Time] Is Null"

No equal to sign.
 

Users who are viewing this thread

Back
Top Bottom