Automatically change data in a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a report in which one column consists of numbers. I want to have them
automatically change to an assigned word, i.e. 1 is "wordone", 2 is "wordtwo"
etc. I don't want to see the numbers at all. I don't know if it'll need code
or what. (Don't ask why I need this, I don't feel like typing all that :D).
 
Create a small lookup table of the numbers and their "assigned words". You
can then include the table in the record source query of your report and add
the "assigned word" column to your report.
 
You need to set the control source of the column to

=iif(youfieldname.value = 1,"wordone",wordtwo")

the above only works for a two state situation

what you may have to do is build a calculated column in the query in the
report with the correct wordage if you need more flexability.
 
You need to set the control source of the column to

=iif(youfieldname.value = 1,"wordone",wordtwo")

the above only works for a two state situation

what you may have to do is build a calculated column in the query in the
report with the correct wordage if you need more flexability.
IIF can be nested. Not sure of the maximum times it can be nested.
=iif(youfieldname.value = 1,"wordone",iif(youfieldname.value =
2,"wordtwo",iif(youfieldname.value = 3,"wordthree",iif(youfieldname.value =
4,"wordfour","wordfive"))))
Awkward, but it works.

Just a wizard prodder.
Chuck
....
 
It is quite awkward which is why a lookup table is preferred. You should be
able to add values without changing expressions.
 
Agreed with a join to the main table, is gong to be the best way for
multi-values.
 
Back
Top