Make the appropriate index unique. In the table design set the indexed property for the Customer Name field to Yes (No Duplicates).
If you have more than one Customer Name field (e.g. First, Middle, Last) then let me know and I'll give further help.
[sig]<p>Keith C Taylor<br><a href=mailto:TekTips@kctaylor.co.uk>TekTips@kctaylor.co.uk</a><br><a href=
If you get an error message about duplicated records preventing you from saving your table changes then create a new query using the Find Duplicates wizard. This will display records that have been duplicated so that you can delete them or edit the name to be unique.
[sig]<p>Keith C Taylor<br><a href=mailto:TekTips@kctaylor.co.uk>TekTips@kctaylor.co.uk</a><br><a href=
I have ran the duplication wizard as you suggested. The duplications in name are justified as the name is the same for different offices. You said that if I needed to prevent more than 1 field to get back to you and you would tell me what to do. I feel to prevent ligitimate duplication I possible need to prevent duplication in 3 fields.
The easy way, in table design, is to Ctrl-Click the selector at the left of each field name, so that the 3 fields you are interested in are highlighted, then click the Primary Key button on the toolbar. This will create a new index, that will ensure uniqueness across the 3 selected fields.
If you already have a Primary Key index that you don't want to lose, then Click the Indexes button (or menu - View Indexes). Type an index name in the left hand column, e.g. Customer then, in the Field Name column, select the field names in this row and the next two rows so that you have a list of the 3 fields you need to index. Move back to the index name (Customer) and make sure the Unique property is set to Yes. Save the table, and if you now try to enter duplicate records wou will get an error message and the record will not be saved.
Note that you should really check for duplicates across the 3 fields you have selected before trying to change the table design, otherwise, as before, Access will not let you change the table if existing records flout your new rules.
[sig]<p>Keith C Taylor<br><a href=mailto:TekTips@kctaylor.co.uk>TekTips@kctaylor.co.uk</a><br><a href=
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.