ACC1x: Default Values Used Only with a Bound Control |
Q109325
The information in this article applies to:
- Microsoft Access versions 1.0, 1.1
SYMPTOMS
If a form's underlying dynaset contains a field that has a default value, the default value will not be used if there is no control bound to the field.
RESOLUTION
A control on the form must be bound to the field in order for the default value to be used when a new record is added.
STATUS
This behavior no longer occurs in Microsoft Access version 2.0. In Microsoft Access 2.0, properties from tables are inherited, while in version 1.1 table properties are not inherited.
MORE INFORMATION
Steps to Reproduce Behavior
- Open the sample database NWIND.MDB.
- Create a new form based on the Order Details table. Include all the fields except Quantity (which has a default value of 1) on the form.
View the form in Form view. Add the following new records:
Order ID Product ID Unit Price Discount --------------------------------------------- 12000 19 1.00 25%
- From the File menu, choose Save Record.
- Open the Order Details table in Datasheet view. Note that the Quantity column is blank for the records you added, even though this field has a default value of 1.
REFERENCES
Microsoft Access "User's Guide," Version 1.0, pages 216-217
Microsoft Access "User's Guide," Version 1.1, pages 220-222
Keywords : kbusage
Issue type : kbprb
Technology :
Last Reviewed: November 4, 2000 |