Hello,
I am having issues with two expressions I am building for a query and not sure what the problem is. For both of the following, I get a invalid syntax error when I run them. Also, for #2 I am not sure how to sort the query correctly as it asks.
1. Add an expression to display Freshman, Sophomore, Junior, or Senior for the correspondingClass codes FR, SO, JR, and SR. Use a nested IIF function.
Code:
IIf([Students]![Class]="FR,"Freshman",(IIf([Students]![Class]="SO","Sophmore",(IIf([Students]![Class]="JR","Junior",(IIf([Students]![Class]="SR","Senior")))))))
2. Add another expression to display 1, 2, 3, or 4 for the corresponding Class codes FR, SO, JR, and SR. Sort the query on this expression so that the data will display in order of FR, SO, JR, then SR.
Code:
IIf([Students]![Class]="FR,"1",(IIf([Students]![Class]="SO","2",(IIf([Students]![Class]="JR","3",(IIf([Students]![Class]="SR","4")))))))
I am using Access 2016 on a Windows 10 virtual machine on my Mac.