Duplicate Question

wislndixie

New Member
Joined
Feb 13, 2004
Messages
23
I have a very simple "customers" table and form setup. The primary key is the autonumber ID tha access assigns with each new record. I can't seem to find out how to prevent duplicate names being entered. I tried setting to Yes (no duplicates) in one of my tables fields but I keep getting an error message that it won't work. (don't remember the message). Is there an easy way to do this?
Thanks
Mike
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
If you don't want duplicate names to be entered, you should get rid of the Autonumber field and make the name field your primary field. This will ensure that you can't have duplicates.

Never use Autonumber unless you have to. I have never had need of using it. I will design my own identifier key before I use Autonumber.
 
Upvote 0
Sounds like you already have duplicates in your table which is preventing you from changing the settings.

Run a 'Find Duplicates Query Wizard'

This will weed out your weaklings, so to speak.
It will create a table with the results

Then amend your data and you should have no problems setting the Field to Yes (no duplicates).

Regards

PS. You can also get rid of the Autonumber Field as jmiskey suggests, however, keeping it and using that as the relation to other tables will be a FAR more effient way to link the data.

Edit: Really BAD spelling!!!
 
Upvote 0
Apologies a hasty remake against jmiskey's Autonumber.

Yes, I would put in my own Identifier normally.
But I do stand by the fact that relating the table through a number is FAR more efficient in the fact that each entry will take up far less processing and memory time using an Integer than a String, say!

It's your call on whether you manually do this or Autonumber, depends on the table personally
 
Upvote 0
I have to agree that Autonumbers are a good part of database design. Just don't use them where the end users can see them. I often set them to use random rather than sequential numbering just to stop people trying to make sense of a number that's only purpose is to relate two sets of data together :)

Peter
 
Upvote 0

Forum statistics

Threads
1,221,626
Messages
6,160,909
Members
451,677
Latest member
michellehoddinott

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top