MSQuery: Default Value for Access Table Ignored

Last reviewed: September 12, 1996
Article ID: Q121865
The information in this article applies to:
  • Microsoft Query for Windows, version 1.0
  • Microsoft Query for Windows 95, version 2.0

SYMPTOMS

In Microsoft Query, when you create a query using a Microsoft Access data source, default values assigned to fields in the table are not displayed when you add records to the table.

CAUSE

Microsoft Query does not recognize the default value of a field in a table that was created in Microsoft Access. This behavior occurs using either the Microsoft Access 1.0 data source, or the version 2.0 data source.

In Microsoft Access, when you design a table, you can assign a default value to a field. For example, for a Yes/No field type, you can assign the default value 1, which translates to a value of Yes for this field. If you enter a new record in this table, and you don't enter a value in this field of Yes/No data type, the value Yes appears by default.

However, if you enter a new record in this table in Microsoft Query, and you don't enter a value in this field of Yes/No data type, the value 0 appears by default. The value 0 appears even if you have not assigned a default value to this Yes/No field type. Additionally, for any other field types that are assigned a default value in Microsoft Access, the field remains empty if you enter a new record but leave this field blank in Microsoft Query.

REFERENCES

For more information about Setting A Default Value For A Field, choose the Search button in Microsoft Access 2.0 Help and type:

   default value


KBCategory: kbtool kbinterop
KBSubcategory: xlquery

Additional reference words: 1.00 2.00 5.00 5.00c



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: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.