Need help in a complex iif statement

  • Thread starter Thread starter Jack
  • Start date Start date
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.
 
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, "")=""
 
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, "")=""
 
Back
Top