Return records with null value

  • Thread starter Thread starter Sirocco
  • Start date Start date
S

Sirocco

I'm passing a combobox value in a form to a query - basic stuff. But I want
the query to return records with null values for this field if I leave the
combobox blank. Logically, this should work, but doesn't. Any assistance
would be greatly appreciated.
 
The "trick" in the logic is that you can't check for a Null value with an =
operator.
Check for a Null value with IsNull.

If you need more detailed help, perhaps you could post the SQL for your
query.

HTH
- Turtle
 
I ended up making 2 separate queries, identical except fot the "where"
condition for one of the fields. In one query it's set to "is null", and in
the other it's set to the value in a form's combobox. I'd rather just have
one query object, but this solution is still easier than some other
strategies I considered.

Thanks for your response.
 
Back
Top