I need to consolidate 5 fields stored in a table into 29 different categories (eventually to be used in a cross-tab query to generate counts of each category). I'm limited in using switch and/ or iif statements because of the number of nested statements I would need.
Is there a way to do this using by creating a function and using select case? I'm not sure how to reference multiple fields in a table. Thanks!
Here is an example of what I was origionally thinking of:
Code:
test: Switch([ORG Change]="Change" And [Class Change]
="Change" And [Range Maximum]="Down" And [Salary Change]
="Down","Demotion to Another Deartment with Pay Decrease",
[ORG Change]="Change" And [Class Change]="Change" And
[Range Maximum]="Down" And [Salary Change]="No Change",
"Demotion to Another Deartment with No Pay Change",
[ORG Change]="Change" And [Class Change]="Change" And
[Range Maximum]="Down" And [Salary Change]="Up",
"Demotion to Another Deartment with Pay Increase",
[ORG Change]="Change" And [Class Change]="Change" And
[Range Maximum]="No Change" And [Salary Change]="Down",
"Transfer to Another Department with Pay Decrease",
[ORG Change]="Change" And [Class Change]="Change" And
[Range Maximum]="No Change" And [Salary Change]=
"No Change","Transfer to Another Department with No Pay Change",
[ORG Change]="Change" And [Class Change]="Change" And
[Range Maximum]="No Change" And [Salary Change]="Up",
"Transfer to Another Department with Pay Increase")