#Error in a report field for no earthly reason

P

Paul James

Three of the fields in the recordset for a report are named City, State and
Zip.

I can display each of these fields in my report individually without a
problem. However, when I try to combine them with the expression:

=City&", "&State&" "&Zip

What makes this even more puzzling is that Print Preview displays "#Error"
in the calculated field. In Design View, Access converts the expression
above to

=[City] & ", " & [State] & " " & [Zip]

Access obviously a) recognizes the fields and b) has no problem with the
syntax. Moreover, there is only one table in the underlying query
recordset. And again, the report displays the individual City, State and
Zip fields in the report without an problem. So why would Access produce
the #Error when I try to combine them in an expression?

Thanks in advance,

Paul
 
P

Paul James

Three of the fields in the recordset for one of my reports are named City,
State and Zip.

I can display each of these fields in the report individually without a
problem. However, when I try to combine them with the expression:

=City&", "&State&" "&Zip

Print Preview displays "#Error" in the calculated field.

What makes this even more puzzling is that in Design View, Access converts
the expression above to

=[City] & ", " & [State] & " " & [Zip]

Access obviously a) recognizes the fields and b) has no problem with the
syntax. Moreover, there is only one table in the underlying query recordset.
And again, the report displays the individual City, State and

Zip fields in the report without an problem. So why would Access produce the
#Error when I try to combine them in an expression?

Thanks in advance,

Paul
 
M

Marshall Barton

Paul said:
Three of the fields in the recordset for a report are named City, State and
Zip.

I can display each of these fields in my report individually without a
problem. However, when I try to combine them with the expression:

=City&", "&State&" "&Zip

What makes this even more puzzling is that Print Preview displays "#Error"
in the calculated field. In Design View, Access converts the expression
above to

=[City] & ", " & [State] & " " & [Zip]

Access obviously a) recognizes the fields and b) has no problem with the
syntax. Moreover, there is only one table in the underlying query
recordset. And again, the report displays the individual City, State and
Zip fields in the report without an problem. So why would Access produce
the #Error when I try to combine them in an expression?


Check to make sure the text box is not named the same as any
of the fields in the expression.
 

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