if statement?

C

Carl Schuster

can anyone help?

i'm trying to make a query where if the field has no input (the input is
variable) given it'll show all data.
What statement is best to use? I've tried it with a IIF statement but it
doesn't work with * as the wildcard to show all data.

IIf([soort],Null,Like "*")

Please help.
 
F

Fredg

Carl,
What is [Soort]?
Is that a criteria parameter, i.e. [Enter Search word]?

If so, then:
Like IIf(IsNull([Soort]),"*",[Soort])

If no parameter entry is made, all records will be returned, otherwise just
the ones that match the entered text.
 
C

Carl Schuster

Thanks.
I had to put in the like ....
I fixed it like this ......... [soort] Or Like IIf([soort],Null,"*") ......
Fredg said:
Carl,
What is [Soort]?
Is that a criteria parameter, i.e. [Enter Search word]?

If so, then:
Like IIf(IsNull([Soort]),"*",[Soort])

If no parameter entry is made, all records will be returned, otherwise just
the ones that match the entered text.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Carl Schuster said:
can anyone help?

i'm trying to make a query where if the field has no input (the input is
variable) given it'll show all data.
What statement is best to use? I've tried it with a IIF statement but it
doesn't work with * as the wildcard to show all data.

IIf([soort],Null,Like "*")

Please help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top