troubleshooting Question

Checking for duplicate data entry in a Microsoft access form using DLookup

Avatar of fubarsmithuk
fubarsmithuk asked on
Microsoft Access
12 Comments1 Solution2222 ViewsLast Modified:
Hello Experts,
I have a MS Access 2003 DB with a table containing customers details with over 3000 records on a multiuser system of 15 users. When the user opens the data entry form the focus is set to a field [Post_Code] ready for data input. Once the user has entered the post code data I want access to check to see if it already exists in the database, if not then the user can carry on inputting with no interruption but if a duplicate does exist then I want a pop-up message warning the user to search for the duplicate before continuing with 2 options  Option 1 is to not save the data input to the table and open the search function to allow the user to check if this particular customer is already in the table or Option 2 - If the user is happy this is a genuine new customer then to continue entering data.
The table has a primary key called [ID] but duplicates are allowed in the 'POST CODE' field as many properties are covered by 1 post code but I want a warning to remind the user to check rather than inputting a duplicate again which is what has been happening to date.
The table is called CUSTOMERS, The data input form is called SNAG System and the field I want to check is [Post_Code] which is a string value.

I have tried working out the DLookup command and have a little understanding but cant get it right. I have also tried the DCount function but with no success so would prefer to use DLookup

Thank you in advance.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros