ACC: Null Value Does Not Pass Validation Rule (117542)
The information in this article applies to:
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q117542 Novice: Requires knowledge of the user interface on single-user computers.
SYMPTOMS
You cannot leave a field blank, or Null, in a table's Datasheet view if the
field has a validation rule.
CAUSE
This behavior only occurs when adding a new record with two fields, one of
which has a data type of AutoNumber (or Counter in version 2.0).
This behavior differs from that of Microsoft Access version 1.x. In
Microsoft Access 1.x, a Null value is accepted for a field, even if "Or Is
Null" is not part of the validation rule.
RESOLUTION
Include "Or Is Null" as part of the validation rule for the field. For
example, a validation rule for a text field could be:
"A" Or "B" Or Is Null
STATUS
This behavior is by design.
REFERENCES
For more information about the ValidationRule property, search for
"ValidationRule property," and then "Create a validation rule for a
control" using the Microsoft Access 97 Help Index.
For more information about using Null values in a validation rule, search
for "ValidationRule property," and then "ValidationRule, ValidationText
Properties" using the Microsoft Access 97 Help Index.
Modification Type: | Major | Last Reviewed: | 5/6/2003 |
---|
Keywords: | kbprb KB117542 |
---|
|