D
Dazed And Confused
Lately I have been finding instances where I have several data items
that I need to name something else. For example, ages. If the
customer is between 18 and 21 put them in the group "18 To 21 Group"
etc.
I have been using nested IIFs in my queries to accomplish this. For
example:
AgeGroup:=IIF([Age]Between 18 and 21, "18 To 21 Group",IIF([Age]
Between 22 and 30,"22 To 30 Group","All Other")) And so on and so on.
*
I've also used them to group other things like Race for example.
RaceName:=IIF([Race]="A","Asian",IIF([Race]="WH","White",IIF([Race]="BL","Black","All
Other"))) and so on.
*
This works, but it sure gets to be cumbersome and time consuming. I
can't help but feel that there has got to be a better/simpler way of
doing this. Anyone have any ideas they would care to share. I sure
would appreciate it.
Thanks!
SJ
that I need to name something else. For example, ages. If the
customer is between 18 and 21 put them in the group "18 To 21 Group"
etc.
I have been using nested IIFs in my queries to accomplish this. For
example:
AgeGroup:=IIF([Age]Between 18 and 21, "18 To 21 Group",IIF([Age]
Between 22 and 30,"22 To 30 Group","All Other")) And so on and so on.
*
I've also used them to group other things like Race for example.
RaceName:=IIF([Race]="A","Asian",IIF([Race]="WH","White",IIF([Race]="BL","Black","All
Other"))) and so on.
*
This works, but it sure gets to be cumbersome and time consuming. I
can't help but feel that there has got to be a better/simpler way of
doing this. Anyone have any ideas they would care to share. I sure
would appreciate it.
Thanks!
SJ