Full Version: Translate numbers to caption on report
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
lyonder2000
I created a form that has an option group. The option group gives me the data for each option as a 1 or 2. I am building a report and instead of my report pulling the "1" or "2" from the table and displaying this, I would like to translate the 1 to be a phrase and the 2 to be another phrase on the report solely. Can I set some type of IF statement on the record source or anything similar to achieve this.
KimbleG
Certainly can, and very easy to do in Access.

=IIF([MyField]=1,"Put phrase 1 in here","Put phrase 2 in here")

KG
lyonder2000
Do I need to enter that in the 'control source' property for the textbox that reads to the report.
kuifjexx
Yes, add the above mentioned expression in the control source property of the textbox

HTH

Greetz from Belgium compute.gif

Luc aka Kuifjexx

Edited by: kuifjexx on Sat Jun 14 9:28:26 EDT 2008.
lyonder2000
Got it. Works great. Thanks.
kuifjexx
Glad to hear the problem is solved sad.gif

Greetz from Belgium compute.gif

Luc aka Kuifjexx
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.