Using Is Not Null in query filter

  • Thread starter Thread starter Douglas J. Steele
  • Start date Start date
D

Douglas J. Steele

You can't.

I assuming you're trying to use "Is Not Null" instead of a specific value in
your query. That means your query has got the = operator (or Like) between
the table field and the value. Trying to have Field1 = Is Not Null or Field1
Like Is Not Null is invalid syntax.
 
Scott said:
In code, how can i set a control equal to "Is Not Null", so my query
will pickup its value?

Me.choiceYear.Value = is not null

I tried the above code but syntax is wrong. My query is correct
pointing to the form control.


Try:

Not (IsNull(Me.choiceYear.Value))

hth

Hugh
 
In code, how can i set a control equal to "Is Not Null", so my query will
pickup its value?

Me.choiceYear.Value = is not null

I tried the above code but syntax is wrong. My query is correct pointing to
the form control.
 
Back
Top