syntax error with this code

dada123

Registered User.
Local time
Today, 13:24
Joined
Aug 16, 2010
Messages
10
here's my code:

strSQL4 = "Select * From Transaction Where Barcode='" & Me.TxtCode & "' And EntryDate=#" & Me.ccDate & "# And TimeOut!=NULL"

I got error when I tried to add the "And TimeOut!=NULL" anyone can help? thanks in advance!
 
Is the exclamation point really part of the field name? If so bad idea, but the work around is to bracket the name:

[TimeOut!]

Also, nothing is ever equal to Null. Use the IsNull() function.
 
And, if I'm not mistaken it should be either

[TimeOut] Is Null

or

IsNull([TimeOut])

And why the ! at the End of TimeOut? If that is really included then you should rename your field. If it isn't and you just added it then you didn't use it in a correct way.
 
I must not have said both of those things very well.
 

Users who are viewing this thread

Back
Top Bottom