Is there a way to write an if/or statement without having to repeat the field name every time. Example: I have a query that works as follows:
IIf([Q61: Group]='Oper-Endow' Or [Q61: Group]='Desig-Endow' Or [Q61: Group]='Life Inc_Desig' Or [Q61: Group]='Oper-Life Inc' Or [Q61: Group]='Endow-Endow','620',IIf([Q61: Group]='Oper-Plant' Or [Q61: Group]='Desig-Plant','600',IIf([Q61: Group]='Oper-Loan' Or [Q61: Group]='Desig-Loan','630',IIf([Q61: Group]='34700-833xx','500',IIf([Q61: Group]='Oper-Desig' Or [Q61: Group]='Desig-Desig' Or [Q61: Group]='Oper-Oper','660',' '))))).
I need to add more to this query, but Access limits the amount of string I can use and it's not enough. Is there a way to not use the [Q61: Group] everytime? I tried the following:
IIf([Q61: Group]=('Oper-Endow' Or 'Desig-Endow' Or 'Life Inc_Desig' Or 'Oper-Life Inc' Or 'Endow-Endow'),'620',IIf([Q61: Group]=('Oper-Plant' Or 'Desig-Plant'),'600',IIf([Q61: Group]=('Oper-Loan' Or 'Desig-Loan'),'630',IIf([Q61: Group]='34700-833xx','500',IIf([Q61: Group]=('Oper-Desig' Or 'Desig-Desig' Or 'Oper-Oper'),'660',' '))))).
But, I get errors when I try this.
Thanks.