MSQuery: Default Value for Access Table Ignored

ID: Q121865

1.00 2.00 WINDOWS kbtool kbinterop

The information in this article applies to:

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

Keywords          : xlquery 
Version           : 1.00 2.00
Platform          : WINDOWS

Last Reviewed: September 15, 1996