From: jhicsupt on
I have a query that prompts for value. I need to include blanks. I am using
the below. If user presses OK, I need to include all records, even if field
is blank.

Like [Enter Owner or press OK for ALL: ] & "*"

From: Wayne-I-M on
Add 2 Criterias

1st criteria
Like [Enter Owner or press OK for ALL ]

2nd criteria
Like [Enter Owner or press OK for ALL ] Is Null

--
Wayne
Manchester, England.



"jhicsupt" wrote:

> I have a query that prompts for value. I need to include blanks. I am using
> the below. If user presses OK, I need to include all records, even if field
> is blank.
>
> Like [Enter Owner or press OK for ALL: ] & "*"
>
From: KenSheridan via AccessMonster.com on
In the criteria row of the relevant column in query design view enter the
following as a single line:

LIKE [Enter Owner or press OK for ALL: ] & "*" OR [Enter Owner or press OK
for ALL: ] IS NULL

If the user closes the dialogue without entering a value the parameter will
be NULL, so the second part of the OR operation will evaluate to TRUE for any
row regardless of the value, or absence of a value, in the column and all
rows will be returned. Note that once you've saved the query, if you open it
again in design view Access will have moved things around. Don't worry, the
underlying logic is the same and it will work in exactly the same way.

Ken Sheridan
Stafford, England

jhicsupt wrote:
>I have a query that prompts for value. I need to include blanks. I am using
>the below. If user presses OK, I need to include all records, even if field
>is blank.
>
>Like [Enter Owner or press OK for ALL: ] & "*"

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access/201004/1