like "*"

N

Netalie

Hi,

I have a form, holding criteria combo's for a query.
I want to define, that if a user leaves one of them
blank, the it won't effect the query's data, meaning, it
would be as if he entered like "*" to the criteria row.

How can i define this?
thanks
 
W

Wayne Morgan

Here is an example of the criteria for the field.

Like (IIf(IsNull([Forms]![Form1]![Text0]),"*",[Forms]![Form1]![Text0]))
 
W

Wayne Morgan

Please post the SQL of your query. I tried what I sent you before I sent it to make sure
there weren't any typos. It works.

--
Wayne Morgan
Microsoft Access MVP


netalie said:
Yes, i have tried all those trickes, it doesnt work
-----Original Message-----
Here is an example of the criteria for the field.

Like (IIf(IsNull([Forms]![Form1]![Text0]),"*",[Forms]! [Form1]![Text0]))

--
Wayne Morgan
Microsoft Access MVP


Netalie said:
Hi,

I have a form, holding criteria combo's for a query.
I want to define, that if a user leaves one of them
blank, the it won't effect the query's data, meaning, it
would be as if he entered like "*" to the criteria row.

How can i define this?
thanks


.
 
N

netalie

Hi wayne,

I'm not using the sql window, im using the query design
grid. I have entered the If condition in the criteria
row, under the relevant field. and it doesnt work...

-----Original Message-----
Please post the SQL of your query. I tried what I sent
you before I sent it to make sure
there weren't any typos. It works.

--
Wayne Morgan
Microsoft Access MVP


netalie said:
Yes, i have tried all those trickes, it doesnt work
-----Original Message-----
Here is an example of the criteria for the field.

Like (IIf(IsNull([Forms]![Form1]![Text0]),"*",[Forms]! [Form1]![Text0]))

--
Wayne Morgan
Microsoft Access MVP


Hi,

I have a form, holding criteria combo's for a query.
I want to define, that if a user leaves one of them
blank, the it won't effect the query's data,
meaning,
it
would be as if he entered like "*" to the criteria row.

How can i define this?
thanks


.


.
 
Top