Problem with query when data removed

  • Thread starter Thread starter Robin9876
  • Start date Start date
R

Robin9876

On a employee table that has forename, surname and emailAddress when
the query for this table is using like "*" it works apart from when
the data in one of those field has been removed from a form.

How can the query be modified to handle this case of when there is no
data there and also when data is there?
 
However when a search value is used so the field criteria is like
"robin*" or Is Null it returns all the null fields as well as not just
the search criteria. The query code works when no value is used.

How can it be modified to only use the Or Is Null part only when there
is a search value?

I would prefer to keep the code in the query if not I will create the
query in VBA.
 
How can it be modified to only use the Or Is Null part only when there
is a search value?

LIKE [Enter criterion, use * as a wildcard:] OR [Enter criterion, use * as a
wildcard:] IS NULL
 
Back
Top