Formatting Access Reports

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

Guest

I am using this expression (=Trim([City] & ", " & [State] & " " & [Zip]) ) to
condense my report output but keep getting an error message. The message is
"This control has a reference to itself." I am stuck at this point as to
what to do.
 
DAPPER said:
I am using this expression (=Trim([City] & ", " & [State] & " " &
[Zip]) ) to condense my report output but keep getting an error
message. The message is "This control has a reference to itself." I
am stuck at this point as to what to do.

The name of the TextBox that you are using this expression in must not be
named the same as any of the fields used in the exptression.

A control can have the same name as the field it is bound to (that is the
default actually), but as soon as you make the ControlSource an expression
containing field names then the name of the control must be different.
 
The text box is probably named 'City', 'State', or 'Zip'. Rename the text
box and you should be OK.
 
I did that and this:

=IIf([City] Is Not Null Or [city]<>"",Trim([City]))+IIf([state] Is Not Null
Or [state]<>"",+", "+Trim([State]))+IIf([state] Is Not Null Or [state]<>"",+"
"+Trim([Zip]))

and it works perfectly.
 
Back
Top