Formatting Access Reports

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.
 
R

Rick Brandt

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.
 
B

Brendan Reynolds

The text box is probably named 'City', 'State', or 'Zip'. Rename the text
box and you should be OK.
 
M

MK

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top