Preventing duplicate entries in a field

punter

Registered User.
Local time
Today, 16:23
Joined
Nov 24, 2006
Messages
108
Hi,

I'm new to access but picking it up pretty well. It is a great toy.

I'm building a database (attached in a zip file) and an entry form to populate the database. The issue I'm running into is with the Vendor Invoice # fields. There are 15 seperate fileds and I don't want to be able to enter duplicates. I indexed the fields but that doesn't tell me that there is an issue until you try to update the field. I've done a lot of looking and can't seem to find a code that will work. Any thoughts?

Thank you in advance for your time and help. I'm going to keep searching this site and other places hoping to find what I'm looking for. Any nudges in the right direction would be great.

Eddie
 

Attachments

First things first. NORMALIZE YOUR DATABASE! You should NOT have repeating fields in a table, Never, Ever! That will only cause you major grief and pain (and a lot of suffering by us forum folk as you keep coming back trying to get "band-aid" fixes for situation which you wouldn't be in if you normalized your data).

You should have a Vendor Table and Containers Table, in addition to your current table (revised to get rid of all of the vendor and container information), at the minimum.

Also, you should not be using # signs in your field names as that can only come back to bite you later. You should never use special characters in object names (except underscores _ ) and you should never use reserved words (such as Date, Column, Form, etc.) as object names (you can use those words within the names, but not as standalone names).

Try revising those things first, before you get too far into it. Take it from someone with over 10 years of Access experience; you do not want to continue down the path you are currently on.
 
Thank you for your reply Bob.

I will look into your suggestions. That is exactly why I come here. You and others on here know the answers to questions I'm not experence enough to ask yet. You probaly just saved me a ton of time in the future. I hate "band-aid" and "work around" solutions myself.

Thank you again for you continued guidance.

Eddie.
 

Users who are viewing this thread

Back
Top Bottom