ACC2000: You Receive No Warning When a Number Is Too Large for a Single Data Type (207471)
The information in this article applies to:
This article was previously published under Q207471 Novice: Requires knowledge of the user interface on single-user computers.
This article applies only to a Microsoft Access database (.mdb).
SYMPTOMS
If you type a value into a field whose data type is Single, and that value
is greater than what the Single data type allows, you do not receive a
warning message. Instead, Microsoft Access automatically replaces the value that you typed with the largest possible value allowed by the data type.
CAUSE
This behavior is caused by a rounding error that can occur when a decimal
fraction does not have an exact binary equivalent.
For additional information about rounding errors, click the article number below
to view the article in the Microsoft Knowledge Base:
210423 ACC2000: Rounding Errors When You Use Floating-Point Numbers
RESOLUTION
Create a validation rule if you want a warning to appear when you have
typed a number that is too large or too small for the data type of the
field.
Example of a Validation Rule- Follow steps 1 and 2 in the "Steps to Reproduce Behavior" section later in this article.
- After setting the format to General Number, set the following properties for the TestSingle field:
Validation rule: Between 3.402823E+38 and -3.402823E+38
Validation text: You have entered a number that is larger than the Field Size setting permits.
REFERENCESFor more information about the single data type, click Microsoft Visual Basic Help on the Help menu, type single data type in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
For more information about validation rules, click Microsoft Access Help on the Help menu, type validate or restrict data entry in tables in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Major | Last Reviewed: | 6/28/2004 |
---|
Keywords: | kbprb KB207471 |
---|
|