Invalid syntax

  • Thread starter Thread starter peljo via AccessMonster.com
  • Start date Start date
P

peljo via AccessMonster.com

I get the error invalid syntax for the following line : ( summing up figures
in case GetBonus = Yes)

Bonus : iif(getBonus = -1;nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3];0)

could you help ?
 
Ditch the semicolons.

iif( Formula to test,results if true, results if false.)

I would guess you want
iif(getBonus = -1,nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3],0)
 
Change the semicolons to commas and add the closing paren
Bonus : iif(getBonus = -1,nz(BonusL1,0)+ NZ([BonusL2],0)+ NZ([BonusL3],0))

It will work if it is in a query,but for VBA, you need a false condition
Bonus : iif(getBonus = -1,nz(BonusL1,0)+ NZ([BonusL2],0)+ NZ([BonusL3],0),
FalseCondition)
 
Unmatched parentheses in what you posted.

Bonus : IIF(getBonus = -1;nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3];0))

It is possible that you need to replace the semi-colons with commas -
depending on your operating system settings for the delimiter. I
suspect you are a non-US user and the ; is the valid delimiter.


'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 

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

Similar Threads


Back
Top