Help with syntax

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

I need the correct syntax for using IIf with Or in a form. What I currently
have isn't working:

=IIf([cboInvoiceNumber].[Column](16)="SH3700" Or
If([cboInvoiceNumber].[Column](16)="SU8035",[cboInvoiceNumber].[Column](9),[cboThirdPartyBilling].[Column](1))

Thanks
Jim
 
Jim,

You don't need the second if. It should look like this:
=IIf([cboInvoiceNumber].[Column](16)="SH3700" Or [cboInvoiceNumber].
[Column](16)="SU8035",[cboInvoiceNumber].[Column](9),­
[cboThirdPartyBilling].[Column](1))

You can also try using IN
=IIf([cboInvoiceNumber].[Column](16) in("SH3700", "SU8035") ,
[cboInvoiceNumber].[Column](9),­[cboThirdPartyBilling].[Column](1))

Rob Buonocore
InfoCore
 
Hi Jim,

Try:

=IIf([cboInvoiceNumber].Column(16)="SH3700" Or
[cboInvoiceNumber].Column(16)="SU8035",[cboInvoiceNumber].Column(9),[cboThirdPartyBilling].Column(1))

Clifford Bass
 
Thanks!

Clifford Bass said:
Hi Jim,

Try:

=IIf([cboInvoiceNumber].Column(16)="SH3700" Or
[cboInvoiceNumber].Column(16)="SU8035",[cboInvoiceNumber].Column(9),[cboThirdPartyBilling].Column(1))

Clifford Bass


Jim said:
I need the correct syntax for using IIf with Or in a form. What I
currently
have isn't working:

=IIf([cboInvoiceNumber].[Column](16)="SH3700" Or
If([cboInvoiceNumber].[Column](16)="SU8035",[cboInvoiceNumber].[Column](9),[cboThirdPartyBilling].[Column](1))

Thanks
Jim
 
Back
Top