ACC2000: Field Called "Name" in Label Report Displays #Error (285946)
The information in this article applies to:
This article was previously published under Q285946 Novice: Requires knowledge of the user interface on single-user computers.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SYMPTOMS
In Access 97, a field called Name in a wizard-generated label report (with a control source of "=Trim(Report!Name)") print previews without any problems. However, when you convert the same database to Access 2000, the Name field in the label report displays #Error in print preview. In Access 2000, using a full report reference such as "=Trim(Reports![labels customers]!Name)" still displays #Error in print preview.
RESOLUTION
To resolve this problem and keep the same field name: - Create a query that is based on the table (for an .mdb). For an .adp, create a view that is based on the table.
- Create an alias for the Name field.
- To re-use the previously created report, open the label report in Design view. On the report's Data tab, change the record source to the query that you created in step 1, and then change the ControlSource property of the text box so that it refers to the alias instead of to the field name.
- To use a new report, run the Label Report Wizard and base the new report on the query that you created in step 1.
For this .mdb example, create a query that is based on the Customers table. Create an alias (FullName) for the Name field. The following is the query syntax:
SELECT Customers.Name AS Fullname
FROM Customers;
Modification Type: | Minor | Last Reviewed: | 7/15/2004 |
---|
Keywords: | kbprb KB285946 |
---|
|