Solved

Access 2103 Web App:  Prevent duplicate entries

Posted on 2014-09-06
2
778 Views
Last Modified: 2014-09-08
Grinding out an Access db upgrade to Access web app.  

Original PK in desktop db is now no longer the PK in web app., given the up-sizing uses the record ID as the PK.  May not have the experience for this upsize, but all seems well after some great advices at: http://www.ascassociates.biz/WebApp12_ConvertTables.aspx  Followed to the letter (especially the last paragraph on referential integrity) and all is well.

Now onward; user on data entry in the app., can create duplicates in the field that was the PK.  Minor issue since all still seem related correctly, but will be when running existing  reports on desktop.  The duplicates will deliver bad results.  What is best method to prevent user from creating a new record using an existing records pseudo PK field?

...or better put, ignoring the PK comment:  How to prevent user from entering duplicate data in a given field?
0
Comment
Question by:VirtualKansas
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
Comment Utility
Create a Unique Index on the table and include the fields that make that record unique. For example, if I have a Customer table, and want to be sure that the values of CustomerName + CustomerPhone + CustomerZip are unique, then I'd add those three fields to a Unique Index.

Web App Unique Index
0
 

Author Closing Comment

by:VirtualKansas
Comment Utility
Hi Scott and thanks for reply.  My problem was actually simpler, but you lead me down the right path.  I only have one unique field requirement in the original db design.  Long story, but the original design didn't have table relationships, I added those later but failed to enforce the index/no duplicates on the field.  With your help, we simply applied the index rule and boom, got the result we're after.

Thank you for "Access 101" reminder.  As long as you agree with our method (even simpler than we thought), then case closed, with our thanks.

BTW; really appreciate your responsiveness.  EE in general has been surprisingly unresponsive, the last few weeks.  Been thinking twice about my subscription, but your help has made a bigger difference then you know and restored our faith.  TY
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now