Prevent writing Duplicate entries to table, foreign primary key

Rhin3

New member
Local time
Yesterday, 19:16
Joined
Sep 9, 2016
Messages
3
I created an input form based off of a query that prefills some data using the tab stop, I have a primary key set on one of the tables in my query (if I make a primary key on both tables it prevents my tab stop from working. The thing is I need to prevent duplicate entry on the input form but I cant add the second primary key to the second table without losing my form functionality. I have a pop up which warns the user when a duplicate entry has been detected unfortunately if you close the window you can still save the duplicate entry. Any suggestions on this conundrum?




Rhinos are cool.
 
Welcome to the forum

This sounds like a table design problem. Typically you would only use a single table for a single form, and if that table has a related table of child records, you would add/edit those using a subform. This preserves the simplicity of the 1-to-many relationship on which data is most commonly related.

But it sounds like you have two tables that provide one editable record for a single form, and if that is so--if those tables are not related 1-to-many--then why aren't they a single table? Why have two primary keys (and therefore two tables) for an object you seem to want to edit as a single record in a single form?

Rhinos are cool, but penguins--omg--penguins are the bomb.com
 
Thanks MarkK,
one table contains data from a data warehouse, the other table is the one which the form rights to and calls the fields that need to be entered. the query brings these two tables together and gives me the "id" field which calls a bunch of data from form one and allow data entry to form 2. Neither table has child records.

blow is the query that the form was created from.

Lol Penguins are pretty fly too
 

Attachments

  • scrnShot.PNG
    scrnShot.PNG
    18.4 KB · Views: 100
I don't see any reason to have two tables with that data, especially if there is no parent/child or one-to-many relationships in the data. Save yourself the trouble.

And don't get me wrong, I like rhinos too. :)
 
The relationship is more one-to-one each transaction has a control number, that number has certain info attached and required that certain information be verified by the use (data entry form) I cant write to the table that holds the info as it is connected to an outside source. Do you know and methodical workarounds?

Rhinos and Penguins are bosses :cool:
 

Users who are viewing this thread

Back
Top Bottom