Prevent entry of duplicate values (MDB)

Microsoft Office Access 2003

Show All Show All

Prevent entry of duplicate values (MDB)

Note  The information in this topic applies only to a Microsoft Access database (.mdb).

  1. Open a table in Design view.
  2. Do one of the following:

    Show Prevent duplicate values from being entered into a field

    1. In the upper portion of the window, click the field that you want to prohibit duplicate values for.
    2. In the lower portion of the window, click in the Indexed property box, and then click Yes (No Duplicates).

    Show Prevent duplicate values from being entered into a combination of fields

    1. Create a multiple-field index using the fields you want to prohibit duplicate values for. Leave the Indexes window open when you have finished defining the index.

      ShowHow?

      1. Open the table in Design view.
      2. Click Indexes Button image on the toolbar.
      3. In the first blank row in the Index Name column, type a name for the index. You can name the index after one of the index fields, or use another name.
      4. In the Field Name column, click the arrow and select the first field for the index.
      5. In the next row in the Field Name column, select the second field for the index. (Leave the Index Name column blank in that row.) Repeat this step until you have selected all the fields you want to include in this index.

      Note  The default sort order is Ascending. Select Descending in the Sort Order column of the Indexes window to sort the corresponding field's data in descending order.

    2. In the upper portion of the Indexes window, click the new index name.
    3. In the lower portion of the Indexes window, click the Unique property box, and then click Yes.