Report Labels

K

Ken

I created two different label reports from imported Excel files using the
report label wizard that work just fine. The reports are based on queries
based on tables input from the Excel files. I went to do a third label report
and so on and every time I run the report I get #error where the person name
is suppose to be. The label report design that's working looks like this:

=Trim([FULL NAME])
=Trim([PRIMARY ADDRESS])
=Trim([CITY] & ", " & [STATE] & " " & [ZIP+4])

The label report design that's not working looks like this:

=Trim([Report]!Name)
=Trim([Address])
=Trim([City] & ", " & [State] & " " & [Zip])

NOTE: The above are all built from queries using different tables.

As is, I get #ERROR in place of person name on label sheet. If I change the
not working model to look like the working model (remove REPORT so it looks
like -Trim([Name])), I get the name of the report in place of the person name.

Why this problem surfaced after building two reports that work just fine is
beyond me. When I run the query based on the table with the info, I get the
person name.

Any help will be greatly appreciated and thanks in advance.

KP
 
M

Marshall Barton

Ken said:
I created two different label reports from imported Excel files using the
report label wizard that work just fine. The reports are based on queries
based on tables input from the Excel files. I went to do a third label report
and so on and every time I run the report I get #error where the person name
is suppose to be. The label report design that's working looks like this:

=Trim([FULL NAME])
=Trim([PRIMARY ADDRESS])
=Trim([CITY] & ", " & [STATE] & " " & [ZIP+4])

The label report design that's not working looks like this:

=Trim([Report]!Name)
=Trim([Address])
=Trim([City] & ", " & [State] & " " & [Zip])

NOTE: The above are all built from queries using different tables.

As is, I get #ERROR in place of person name on label sheet. If I change the
not working model to look like the working model (remove REPORT so it looks
like -Trim([Name])), I get the name of the report in place of the person name.

Why this problem surfaced after building two reports that work just fine is
beyond me. When I run the query based on the table with the info, I get the
person name.


That's to be expected when you use a reserved word for a
field, control or variable name. Access thinks your [Name]
field is referring to the report's Name property.

The best thing to do is change the name of the name field in
the table, but, since you are getting the data from Excel,
that may not be under your control. If necessary, create a
query that provides an alias name for the name field.
 

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