Hi Experts
I'm having a problem with IIf statement and it's driving me crazy... i'm a total newbie and i've spent hours to make it work but to no avail...
what I'm trying to do is to have a search form with several parameters, and i want to ignore the parameter when it's blank, i tried the following criteria
IIf(IsNull([Forms]![Form1]![Text2]),"*",[Forms]![Form1]![Text2]) and
IIf(IsNull([Forms]![Form1]![Text2]), Like "*",[Forms]![Form1]![Text2])
however, when the parameter is empty nothing comes out, only when i fill in the parameter the search result comes out.
just in case i'm not clear i made a simple sample file to illustrate my problem. I've attached the mdb file at
http://www.mediafire.c om/?fymly9xtx0r
it's a very simple file with two tables, one query and one form, i'm using the button in the form to test out the IIf statement in the query.
Please help me!! Thanks in advance.
power2005
I'm having a problem with IIf statement and it's driving me crazy... i'm a total newbie and i've spent hours to make it work but to no avail...
what I'm trying to do is to have a search form with several parameters, and i want to ignore the parameter when it's blank, i tried the following criteria
IIf(IsNull([Forms]![Form1]![Text2]),"*",[Forms]![Form1]![Text2]) and
IIf(IsNull([Forms]![Form1]![Text2]), Like "*",[Forms]![Form1]![Text2])
however, when the parameter is empty nothing comes out, only when i fill in the parameter the search result comes out.
just in case i'm not clear i made a simple sample file to illustrate my problem. I've attached the mdb file at
http://www.mediafire.c om/?fymly9xtx0r
it's a very simple file with two tables, one query and one form, i'm using the button in the form to test out the IIf statement in the query.
Please help me!! Thanks in advance.
power2005
Comment