Report - change 1 into text

P

pokdbz

I have a field that has options of 1,2,3,4 for answers.
On the report how do I change these to text so

1= Yes
2= No
3= Maybe
4= Refused
 
O

Ofer

You can use iif in the control source of the field

=
iif([FieldName]=1,"Yes",IIf([FieldName]=2,"No",IIf([FieldName]=3,"Maybe","Refused")))


Or create a table with two fields, one code the other decription, and you
can look for the value in the table
=dlookup("Description","TableName","Code =" & [FieldName])

I recomand the second way, there less maintnance if you need to add another
code.
 
F

fredg

I have a field that has options of 1,2,3,4 for answers.
On the report how do I change these to text so

1= Yes
2= No
3= Maybe
4= Refused

In an unbound control:
=Choose([FieldName],"Yes","No","Maybe","Refused")
 
Top