R
Rose
I've realized that adding a field that gives the type of
group a customer is in will immensely cut down on my query
headaches. I could write a regular IF statement in my query
to do this, except it would go way over 250 characters. So
this'll have to go into code.
The syntax is wrong, I'm sure. Please tell me the correct
way to word this.
If [Company]="ABC Company" Then "Group A"
Else If [Company]="ABD Company" Then "Group A"
Else If [Company]="ABE Company" Then "Group B"
Else If [Company]="ABF Company" Then "Group C"
Else "Group D"
There's about 15 companies in all to check for.
And please remind me: once I write the code, how I attach
it to my query? Normally an expression to define a new
field (in this case, GroupName) would go in the Field line
of my query view.
group a customer is in will immensely cut down on my query
headaches. I could write a regular IF statement in my query
to do this, except it would go way over 250 characters. So
this'll have to go into code.
The syntax is wrong, I'm sure. Please tell me the correct
way to word this.
If [Company]="ABC Company" Then "Group A"
Else If [Company]="ABD Company" Then "Group A"
Else If [Company]="ABE Company" Then "Group B"
Else If [Company]="ABF Company" Then "Group C"
Else "Group D"
There's about 15 companies in all to check for.
And please remind me: once I write the code, how I attach
it to my query? Normally an expression to define a new
field (in this case, GroupName) would go in the Field line
of my query view.