Solved

Access 2103 Web App:  Prevent duplicate entries

Posted on 2014-09-06
2
962 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 85

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

634 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