Null prob

  • Thread starter Thread starter KRISH
  • Start date Start date
K

KRISH

Hi!
I designed a subform on main form for searching records.
Every thing is working fine except Null values. In the
main form I created a combo control where I want to filter
records based on criteria given in the combo field
(*,'Yes','No',Null). Things working fine with
*, 'Yes', 'No' but is not working With Null. In the query
of sub form I gave Like <forms control>. Kindly help how
to solve the prob.
Thanks for any help.
Krish
 
Unfortunately, you can't use Like (or =) with Null values. Your WHERE clause
in that case needs to be IS NULL.

If you go into the SQL of your query, you could try changing

MyField Like <forms control>

to

(MyField Like <forms control> OR (MyField IS NULL And <forms control> =
"Null"))
 
Back
Top