R
Richard Flaaten
I have a form which contains two unbound text boxes in
which to enter a last name and a first name. This data is
used by a query to search for records in a table.
Some of the records in the table contain no first name,
thus, has Null values.
Using Like "*" & formLastName & "*"
and Like "*" & formFirstName & "*"
Works fine for all records but the ones with null values.
I found a 'workaround' on the web which told me to
type "Or Is Null" after the Like-sentence.
While this works, it creates a problem: when searching
only for a first name, the query always returns every
record that has a Null value.
Any thoughts on how to fix this? I tried using Iif
(formFirstName = "";Null as criteria for the first name
field, but that didn't work.
Thanks,
Richard
which to enter a last name and a first name. This data is
used by a query to search for records in a table.
Some of the records in the table contain no first name,
thus, has Null values.
Using Like "*" & formLastName & "*"
and Like "*" & formFirstName & "*"
Works fine for all records but the ones with null values.
I found a 'workaround' on the web which told me to
type "Or Is Null" after the Like-sentence.
While this works, it creates a problem: when searching
only for a first name, the query always returns every
record that has a Null value.
Any thoughts on how to fix this? I tried using Iif
(formFirstName = "";Null as criteria for the first name
field, but that didn't work.
Thanks,
Richard