Need help in a complex iif statement

J

Jack

Hi,
I have a combobox named cboPlant
The corresponding form is frmCarLogSearch
I need to come up with a iif statement which will satisfy the following
condition

The iif statement will be applied to a query field named plant


If IsNull(frmCarLogSearch!cboPlant) or frmCarLogSearch!cboPlant = "" Then
choose all plants (i.e. something like *, otherwise choose
frmCarLogSearch!cboPlant


I would appreciate any help to resolve this.
 
M

Marshall Barton

Jack said:
I have a combobox named cboPlant
The corresponding form is frmCarLogSearch
I need to come up with a iif statement which will satisfy the following
condition

The iif statement will be applied to a query field named plant


If IsNull(frmCarLogSearch!cboPlant) or frmCarLogSearch!cboPlant = "" Then
choose all plants (i.e. something like *, otherwise choose
frmCarLogSearch!cboPlant


The query field's criteria could be like:

=Forms!frmCarLogSearch!cboPlant OR
Nz(Forms!frmCarLogSearch!cboPlant, "")=""
 
J

Jack

Thanks Marsh for your help. I appreciate it.

Marshall Barton said:
The query field's criteria could be like:

=Forms!frmCarLogSearch!cboPlant OR
Nz(Forms!frmCarLogSearch!cboPlant, "")=""
 

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