ACC1x: Default Values Used Only with a Bound Control

Last reviewed: May 28, 1997
Article ID: 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

  1. Open the sample database NWIND.MDB.

  2. 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.

  3. View the form in Form view. Add the following new records:

          Order ID   Product ID   Unit Price   Discount
          ---------------------------------------------
           12000     19           1.00         25%
    
    

  4. From the File menu, choose Save Record.

  5. 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 TblFldp
Version : 1.0 1.1
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.