Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Avoid duplicates in a non-indexed field

Status
Not open for further replies.

KerryL

Technical User
May 7, 2001
545
US
What's the best way to make it impossible for users to enter identical information into a field that isn't indexed?

One of the tables in my DB contains a list of organizations. The indexed field (OrgID) is numbered automatically and doesn't allow duplicates, but it's the second field (OrgName) that I want to keep from having duplicates.

IOW, if "Salvation Army" exists as one of the entries in OrgName, what's the best way to make sure it cannot be entered a second time by mistake? Or must I make that field 'Indexed(No duplicates)' in order to avoid this possibility?

Thanks for your help,
KerryL

 
You should make it "Indexed(No dups)" and you may also want to do some kind of check to make sure that "almost" the same names aren't entered. What if a user entered:

Salavation Army

that's different from

Salvation Army

So you'd still have two entries for the same organization.

Leslie
 
What you MIGHT want to consider is using a table of 'valid' organization names, and having the user PICK one from a combo box instead of having to type in "Salivation Army" or whatever..

Always MINIMIZE typing when possible.

Jim


If at first you don't succeed, skydiving probably isn't for you!
Another free Access forum:
More Access stuff at
 
I would agree with Jim but recommend you give each organzation name (a large text field) a code, e.g. Autonum, and put that in the original table. It would save you space and probably speed up processing - but would make your programming a little more complex.

Gunny
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top