fenhow
06-21-2007, 10:57 AM
Hi, does anyone know how I can show a text value for my option group selection on a form?
I have Satisifed = 1, Partial Satisified = 2, and Not Satisifed = 3. Data from option group is stored in a field "Status" When run my report based on the query it shows the number versus what it is?
Thanks!
boblarson
06-21-2007, 11:08 AM
In the text box that shows on the report, you can use this:
=IIf([Status]=1,"Satisfied',IIF([Status]=2,"Partial Satisfied',"Not Satisfied"))
fenhow
06-21-2007, 11:21 AM
Thanks Worked Perfect as shown.
=IIf([Status]=1,"Not Satisfied",IIf([Status]=2,"Partially Satisfied",IIf([Status]=3," Satisfied")))
RuralGuy
06-21-2007, 11:25 AM
You can also use:
=Choose([Status],"Satisfied',"Partial Satisfied',"Not Satisfied")
boblarson
06-21-2007, 11:30 AM
You can also use:
=Choose([Status],"Satisfied',"Partial Satisfied',"Not Satisfied")
Ooh, another thing to learn and it is much shorter! I like it! Thanks Allan!
TastyWheat
06-25-2007, 11:36 AM
I'm having a similar problem with a report. I want a 0 to give me "N" and a 1 to give me "Y". I've tried using IIf and Choose but the result is always "#Error".
boblarson
06-25-2007, 11:47 AM
I'm having a similar problem with a report. I want a 0 to give me "N" and a 1 to give me "Y". I've tried using IIf and Choose but the result is always "#Error".
What code, exactly, are you using? What are the names of your field and text box?
TastyWheat
06-25-2007, 11:57 AM
Whoops! I found the problem. I never changed the names of the controls so my control names were the same as my field names. Everything works fine now.
boblarson
06-25-2007, 11:59 AM
Whoops! I found the problem. I never changed the names of the controls so my control names were the same as my field names. Everything works fine now.
Yep, that would do it :D - Been there, done that before myself.