A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help with syntax



 
 
Thread Tools Display Modes
  #1  
Old August 26th, 2009, 06:21 PM posted to microsoft.public.access.forms
Jim
external usenet poster
 
Posts: 39
Default Help with syntax

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


  #2  
Old August 26th, 2009, 06:41 PM posted to microsoft.public.access.forms
Rob Buonocore
external usenet poster
 
Posts: 3
Default Help with syntax

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

On Aug 26, 1:21*pm, "Jim" wrote:
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


  #3  
Old August 26th, 2009, 06:46 PM posted to microsoft.public.access.forms
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default Help with syntax

Hi Jim,

Try:

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

Clifford Bass


"Jim" wrote:

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



  #4  
Old August 26th, 2009, 07:09 PM posted to microsoft.public.access.forms
Jim
external usenet poster
 
Posts: 39
Default Help with syntax

Thanks!

"Clifford Bass" wrote in message
...
Hi Jim,

Try:

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

Clifford Bass


"Jim" wrote:

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





  #5  
Old August 26th, 2009, 09:58 PM posted to microsoft.public.access.forms
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default Help with syntax

Hi Jim,

You are welcome!

Clifford Bass

"Jim" wrote:

Thanks!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.