Solved

Access 2103 Web App:  Prevent duplicate entries

Posted on 2014-09-06
2
909 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40308500
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
ID: 40310229
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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Archiving/Deleting Old E-Mail boxes 4 52
Any benefit to adding a Clustered index here? 4 37
Combo box with two columns question 7 38
2 Global Vars, 1 List Box 4 31
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

734 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