L
levi252
I want to calculate a rate for 3 types of Gears (coded "OT04S", "OT16S", and
"POT02S". I've used IIf in the past when the database contained only 2 Gear
types, but can't seem to get the expression correct now that there are 3 Gear
types. Can I use the IIf function here or should I be going in another
direction?
Here's my best attempt at a 3-outcome IIf:
'Rate:
IIf([Gear]="OT04S",([Count]/([Distance]*"2.93")),(IIf([Gear]="OT16S",([Count]/([Distance]*"3.11"))),([Count]/([Distance]*"1.75"))))'
I get error message "Syntax error (comma) in query expression".
Thanks in advance for help.
"POT02S". I've used IIf in the past when the database contained only 2 Gear
types, but can't seem to get the expression correct now that there are 3 Gear
types. Can I use the IIf function here or should I be going in another
direction?
Here's my best attempt at a 3-outcome IIf:
'Rate:
IIf([Gear]="OT04S",([Count]/([Distance]*"2.93")),(IIf([Gear]="OT16S",([Count]/([Distance]*"3.11"))),([Count]/([Distance]*"1.75"))))'
I get error message "Syntax error (comma) in query expression".
Thanks in advance for help.