Duplicates

  • Thread starter Thread starter Richard B. Wright
  • Start date Start date
R

Richard B. Wright

Greetings,

I have a table that contains customer info, including their address, which
is stored over two fields [Addressno] which holds the address number and
[Street] which hold the street name. I need to check to ensure that
duplicates are flagged.

Here is
what I need to do:

I enter an address over two fields
8000 Main St
where 8000 is in one field and Main St is in another. Then I enter
1200 Mountain Ave

then later

I enter 8000 Main St again. I need something to let me know that I entered
a duplicate address.

Thanks,

Richard
 
Richard,

Any reason for putting this address data into 2 separate fields?

The easiest way to make this happen is to set a unique index on the
combination of Addressno and Street. You do this in the design of the
table. Select Indexes from the View menu, put a name for the index
such as Address, and then enter both fields in the Field Name column,
and set the Unique property to Yes.

This will only work, of course, if the data entry is precisely the
same in both cases. For example, you won't be alerted to the
duplication if you enter 8000 Main St and then later 8000 Main St. or
8000 Main Street.

- Steve Schapel, Microsoft Access MVP
 
Back
Top