If criteria is null return all

K

Krizhek

If criteria is null return all
That all I want to do but after trying several ways I can't get any to work.
Here is what I have tried so far for the criteria

Like [forms]![search]![name] & "*"
<>Which doesn't work since I have 10 fields I want to search and using
this causes null values in some fields to filter out.
Like "*" & [forms]![search]![name] & "*"
<>Same as above
[forms]![search]![name] and ([forms]![Search]![name] is null)
<> this causes the query to response with insufficient memory error

Below is the SQL of my query so you can see how many fields I am dealing with.

SELECT UpdatedTable.[Who are you?], UpdatedTable.Date, UpdatedTable.[User
ID], UpdatedTable.[Profit Center], UpdatedTable.[Policy Number],
UpdatedTable.[Call Type], UpdatedTable.[Action Taken on Call],
UpdatedTable.[Reason for Disconnect], UpdatedTable.[Problem Description]
FROM UpdatedTable;
 
R

Rick B

Just enter your criteria Like [forms]![search]![name] & "*" under each
field you want to check. Put each piece of criteria on a separate row in
the query grid to create an "OR" condition, or on the same line to create an
"AND" condition.

What ten fields are you searching? Are they all name fields? If so, you
have a flawed data structure and you will run into lots of headaches unless
you fix the data structure. If the name may appear in one of several
fields, then you have a one-to-many relationship that should be handled with
a separate related table.

Post back with some details if you need help with the structure of your
table.
 
Top