Iif expressions

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.
 
J

John Spencer

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
'====================================================
 
G

Guest

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.
 
J

John Spencer

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.
 

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

Top