'IIF' with 'And'

PaulJK

Registered User.
Local time
Today, 11:35
Joined
Jul 4, 2002
Messages
60
Hello,

I need to write a query where the result depends upon the heart rate and then the sex. I have so far:

FARHRResult: IIf([FARestingHR]<55 And [Sex] =Male,"Excellent",IIf([FARestingHR] Between 56 And 83 And [Sex] =Male,"Poor", IIf([FARestingHR]>83 And [Sex] =Male,"Very Poor",IIf([FARestingHR]<55 And [Sex] =Female,"Excellent",IIf([FARestingHR] Between 56 And 83 And [Sex] =Female,"Poor""Very Poor")))

I am getting something wrong with the ‘And’. Also the ‘Male’ and ‘Female’ gets placed in brackets.

Any pointers welcome.

Thank you.
 
Put male and female within inverted commas. It adds brackets to these because it thinks they are fields.
 

Users who are viewing this thread

Back
Top Bottom