Creating a nested IF function for a query

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Creating a nested IF function for a query

Post by Rudi »

Hi,

I need some advice on creating a nested IF function for an Access query. My example is in an Excel spreadsheet which I have attached. I am on the right track with the formula, but I'd like to bounce it off the Access gurus to ensure I am not going the looooong way around.

All the details are in the attachment.

TIA for any help/advice!
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Creating a nested IF function for a query

Post by HansV »

AND(...) is an Excel function, not an Access function. The Access equivalent of "AND(P,Q)" is "P And Q" (don't copy the quotes).

You could use =IIf([Field1]>=80 And [Field2]>=80 And ..., ...) or =IIf(([Field1]>=80)*([Field2]>=80)*..., ...)

But I don't think there's a really short version - you do need to check all the conditions.
Best wishes,
Hans

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Creating a nested IF function for a query

Post by Rudi »

Thanks for that advice and correction Hans. I appreciate it. :cheers:
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.