Labels that are converted from an Access 97 database to an Access 2002 database display "#Error" in the text boxes that are bound to Report!Name (282321)
The information in this article applies to:
- Microsoft Access 2002
- Microsoft Access 97
This article was previously published under Q282321 Novice: Requires knowledge of the user interface on single-user computers.
This article applies only to a Microsoft Access database (.mdb).
SYMPTOMSWhen you open a Microsoft Access 97 database in Microsoft Access 2002 and you convert the Access 97 database to the current file format, a problem occurs. Label reports do not correctly display some data. Data from fields that are named Name, appear as "#Error" in the converted database.
Data from fields that are named Name were presented correctly in the Access 97 labels.CAUSEThis problem occurs because
the text box is bound to a field. The name of the field is the same name as an Access reserved name or a global keyword.
RESOLUTION
To work around this problem, use one of the following methods.
Set the ControlSource Property for the Text Box to Name
To set the ControlSource property for the text box to Name, follow these steps:
- Open the report in Design view.
- Select the control that displays #Error.
- If the Properties window is not showing, click Properties on the View menu.
- Select the Data tab.
- Change the Control Source from =Trim(Report![Name]) to Name.
Use a query to create an alias for the field called Name. - In the Database window, under Objects, click Queries then double-click Create query in Design view.
- In the Show Table dialog box, select the table you want to create the report from, click Add, and then click Close.
- Double-click the title bar of the Field List to select all fields, and then drag all fields to the design grid.
- Change the entry in the Field row in the Name column to FullName:Name.
- Save the query as qryCustAlias and close it.
- Use the Label Wizard to create labels based on this query rather than on the table.
Include on the label a hidden text box for which the ControlSource property is simply Name. - In the Database window, under Objects, click Reports and then click your report.
- Click Design to open the report in Design view.
- If the Field List is not visible, click Field List on the View Menu.
- Drag the Name field from the Field List to the Detail section of the report, and if the property sheet is not visible, on the View menu click Properties.
- On the Format tab of the property sheet, set the Visible property to False.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. REFERENCESFor additional information about reserved names, click the article number below
to view the article in the Microsoft Knowledge Base:
286335 ACC2002: Reserved Words in Microsoft Access
Modification Type: | Major | Last Reviewed: | 11/19/2004 |
---|
Keywords: | kbbug kbnofix KB282321 |
---|
|