[Previous] [Content Page] [Next]

Setting a Default Value

A field's default value
The for the State field automatically appears in a new record.

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.

  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.

[Previous] [Content Page] [Next]