About error checking in forms and reports
In Microsoft Office Access 2003, you can enable automatic error checking for common errors in form and reports. Error checking points out errors in a form or report, and provides you with options for correcting them.
The following illustration shows the BirthDate label control in Design view. Error checking for errors related to shortcut keys is turned on, so you see an error indicator on the top left corner of the control. The control has a duplicate shortcut key assigned to it.
If page orientation is set to right-to-left, you will see error indicators on the top right corner.
If you select the control with an error indicator, the Error Checking Options button appears.
If you rest your mouse pointer on the Error Checking Options button and then click the arrow in the button, a menu displays a set of options to correct or ignore the error.
The following table lists the types of errors for which you can enable error checking.
Category | Description | Applies To |
---|---|---|
Unassociated label and control |
You select a label and a control, such as a text box or list box, that are not associated with each other. The error indicator will not appear; instead, the Trace Error button will appear next to the selected control. - You will see the Trace Error button even if the selected label or control is associated with another control. | Forms and reports |
New unassociated labels | You add a label to a form or report that is not associated with any other control. | Forms and Reports |
Keyboard shortcut errors | You select a control with an
invalid shortcut key, such as:
| Forms only |
Invalid control properties | You select a control with
one or more properties set to invalid values, such as:
| Forms and Reports |
Common report errors | The current report either has an invalid sorting and grouping definition, or is wider than the selected paper size. | Reports only |
If a control has multiple errors, you will see the error indicator until you correct or ignore all the errors. For example, the following errors, listed from highest to lowest priority, can occur on the BirthDate label at the same time:
- Space character as a shortcut key.
- Unassociated label with shortcut key.
- Duplicate shortcut key.
- New unassociated label.
For example, if the BirthDate label is not associated with any control and it has a space character specified as a shortcut key, you will first see the error indicator for the invalid shortcut key. After you correct or ignore the error, you can click the error indicator again to associate it with a control, or you can ignore the error, and so on.
If you want to hide the error indicator and the Error Checking Options button without fixing the error, you can choose to ignore the error by clicking Ignore Error on the Error Checking Options menu. The error indicator and the Error Checking Options button will disappear until you open the form or report again.