MS Access

Setting a Default Value

You can enter a default value to specify a value that is automatically entered in a field when a new record is created.

For example, if most of your clients are from Texas, you could set the default value for the State field to "TX." When a user adds a record to the table, they can either accept the "TX" default value for the State field or enter their own value.

A field's default value

The for the State field automatically appears in a new record.

  1. Switch to Design view by clicking the View button on the toolbar.

    Since the majority of your customers are from Minnesota, you decide to add "MN" as the default value for the State field.

  2. Click the State field.

    Now you can add a default value to the State field

  3. Click the Default Value box and type MN, as shown in Figure.

    A common default value used in Date fields is the current date. To automatically add the current date, type =Date( ) in the field.

    Let's see how the new default value works.

  4. Click the Save button on the toolbar to save your changes, and then click the View button to display the table in Datasheet view.

    You will need to add a new record in order to see any .

  5. Click the New Record button on the Record Navigation bar.

    Access adds a new blank record to the table. Notice that the State field already contains the "MN" default value, as shown in figure. If the customer is from another state, you can simply replace the default value with your own data.

To enter a default value for a field:

  1. make sure the table is displayed in design view and click the field you want to add a default value to.

  2. click the default value box in the field properties section.

  3. enter the default value you want to appear in the field for new records.