IIF Statements in SubForms

mabiem

Registered User.
Local time
Today, 07:05
Joined
May 3, 2013
Messages
16
Hi,

I have some linked tables I'm using as subforms. I'd like to make the data a little more readable rather than numbers that my linked table spits out (can't do anything about it).

In my main form I can use the control source and enter something like this:
=IIf([FieldName]="1","Male",IIf([FieldName]="2","Female"))

I can put as many statements as I want, just add a bracket at the ned for each one. Works great.

This however does not work in the subform. I get a circular logic error. If I then add a table reference like:
=IIf([TableName]![FieldName]="1","Male",IIf([FieldName]="2","Female"))

The error goes away, but it still displays as #Name?

Any Ideas?

Mike
 
Have you tried:
=IIf([FieldName]="1","Male",IIf([FieldName]="2","Female"))
Or
=IIf([FieldName]= 1 ,"Male",IIf([FieldName]= 2 ,"Female"))
 
Yes. No luck.

Also, it definitely seems to want a table reference.

Mike
 
Try changing the name of text box if it is the same as the field in the source table/query
 

Users who are viewing this thread

Back
Top Bottom