Numeric values in table; need text for report

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

Guest

Hello -

I have Yes/No stored with either a 1 or 2 in a table. How do I get the 1 or
2 to print as "Yes" or "No" in my report?
 
1- Include the yes/no field at the detail level of the report
2- set its visibility to off/false
3- add new text box (unbound) where you want the yes/no to appear
4- add code at detail level and check the value of the yes_no (bound) field.
If it is a 1 then display the string 'yes', else display 'no'
 
Sandy said:
I have Yes/No stored with either a 1 or 2 in a table. How do I get the 1 or
2 to print as "Yes" or "No" in my report?


Change the text box's Control Source from field to the
expression:
=IIf(thefield = 1, "Yes", "No")
and make sure the text box's Name is not the same as the
name of thefield.

How did you get a Yes/No field to store a 1 or a 2? Yes/No
fields can only store a True (-1) or False (0) value so one
of us is missing something.
 
Hi Marshall -

Thanks for responding!

Sorry. It wasn't really a Yes/No field. It really was from the numbers
generated by a checkbox group.
 
Sandy said:
Sorry. It wasn't really a Yes/No field. It really was from the numbers
generated by a checkbox group.


Ok, that makes more sense. Did the change I suggested do
what you want?
 
Back
Top