About error checking in forms and reports

Microsoft Office Access 2003

Show All Show All

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.

Error indicator

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.

Trace Error Button next to the selected control

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.

Trace Error menu options

ShowTypes of errors

The following table lists the types of errors for which you can enable error checking.

CategoryDescriptionApplies 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 labelsYou add a label to a form or report that is not associated with any other control.Forms and Reports
Keyboard shortcut errorsYou select a control with an invalid shortcut key, such as:
  • An unassociated label has a shortcut key associated with it.
  • A label or a button has an duplicate shortcut key assigned to it.
  • A label or a button has a space character as its shortcut key.
Forms only
Invalid control propertiesYou select a control with one or more properties set to invalid values, such as:
  • The string specified in the Control Source property is not a valid expression or field name.
  • The expression specified in the Control Source property refers to the control itself (circular reference).
  • The expression specified in the Control Source property does not begin with “=”.
  • The Option Value property is not unique in the option group.
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

ShowResolving multiple errors

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.

ShowIgnoring an error

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.

ShowTurning off error checking

To turn off error checking for one or more types of errors, you can click Error Checking Options on the Error Checking Options menu. On the Error Checking tab, under Form/Report Design Rules, you can specify the settings you want. You can also access the Error Checking tab by clicking Options on the Tools menu, and then clicking the Error Checking tab.