if statement?

  • Thread starter Thread starter Carl Schuster
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top