Syntax problem with iif

damie

Registered User.
Local time
Today, 12:49
Joined
Oct 20, 2003
Messages
26
Hi,

I'm just starting to get my head around the basics of Access, and am following a tuturial on using the iif function in Queries. I have a table with a "Credits" column, and with this table selected, I want to create a field which says "Full year" whenever Credits is more than 3 and "Half year" otherwise. Therefore in the line "Field" (I'm using a Spanish version of Access so maybe it's called something else) I have inserted the following:

Length: iif ([Credits]>3, "Full Year", "Half Year")

Unfortunately I just get a syntax error message coming through saying that maybe I've used "an operand without operator" (literal translation from the Spanish) and I just can't understand what I'm doing wrong, because the tutorial seems to be quite sure that this works fine.

I hope someone out there spots my error straight away....


Thanks.
 
Might be a regional settings thing:

Try:

Length: IIf([Credits]>3;"Full Year"; "Half Year")
 
Spot on! I can stop pulling my hair out, now!

Thanks very much!

damie.
 

Users who are viewing this thread

Back
Top Bottom