Iif expressions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to build an expression to show that if there are 6 or more people
in a group that there should be a discount on their rate, otherwise show the
regular rate. I've been trying the following Iif but I keep getting a msg
about how Iif's should be enclosed in parenthesis... They are!! Help!!

"ProposedRate": Iif:([People]>=6,[RentalRate]-200,[RentalRate])

I've also tried this one:

"ProposedRate":Iif:([People]<6,[RentalRate],[RentalRate]-200)

And I've tried both with and without the quotes on my preferred field
name... I'm lost.
 
Try the following

ProposedRate: IIF([People]>=6,[RentalRate]-200,[RentalRate])

Syntax is Name of calculated field, colon, Calculation or expression



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Can't thank you enough!! Almost pulled my hair out because of one silly colon!!

John Spencer said:
Try the following

ProposedRate: IIF([People]>=6,[RentalRate]-200,[RentalRate])

Syntax is Name of calculated field, colon, Calculation or expression



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


Kim said:
I'm trying to build an expression to show that if there are 6 or more people
in a group that there should be a discount on their rate, otherwise show the
regular rate. I've been trying the following Iif but I keep getting a msg
about how Iif's should be enclosed in parenthesis... They are!! Help!!

"ProposedRate": Iif:([People]>=6,[RentalRate]-200,[RentalRate])

I've also tried this one:

"ProposedRate":Iif:([People]<6,[RentalRate],[RentalRate]-200)

And I've tried both with and without the quotes on my preferred field
name... I'm lost.
 
As a nearly bald guy, all I can say is "I'm glad I stopped you from
pulling out your hair."


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


Kim said:
Can't thank you enough!! Almost pulled my hair out because of one silly colon!!

John Spencer said:
Try the following

ProposedRate: IIF([People]>=6,[RentalRate]-200,[RentalRate])

Syntax is Name of calculated field, colon, Calculation or expression



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


Kim said:
I'm trying to build an expression to show that if there are 6 or more people
in a group that there should be a discount on their rate, otherwise show the
regular rate. I've been trying the following Iif but I keep getting a msg
about how Iif's should be enclosed in parenthesis... They are!! Help!!

"ProposedRate": Iif:([People]>=6,[RentalRate]-200,[RentalRate])

I've also tried this one:

"ProposedRate":Iif:([People]<6,[RentalRate],[RentalRate]-200)

And I've tried both with and without the quotes on my preferred field
name... I'm lost.
 
Back
Top