Problem with table relationships - Foreign Key and Primary Key

Alico

New member
Local time
Today, 01:41
Joined
Sep 7, 2014
Messages
2
Hi,

My application is a series of checklists, represented each by a table. They all have a common "Job ID" which is entered by the user in the first form/table. This "Job ID" is a common value with all other tables.

What I want, is that the user doesn't have to enter the "Job ID" every in every form. I just want him to enter it once in the first menu, and then it's copied automatically to all the other tables (creating a new record in each table)

Is that possible? or I'm thinking wrong?

Thanks for your help and time.

Regards,
Ali
 
It sounds like your table structure might be incorrect. You've described a bunch of tables with 1-1 relationships, which isn't proper. Instead, all that data should be in one table.

For a 1-many relationship what you would do is use a form/sub-form to accomplish what you want. You would link your two forms by they primary/foreign key and then it would automatically assign the foreign key to all records added in the sub-form.

Again, though, what you've described makes me think you have an improper table structure. Can you post a screenshot of your realtionships?
 
Alico, your issue is really when you create a new record and you did not say how you do that. Do you open an unbound form to enter the information? Do you use recordsets or an append query? Do you use the arrow in the navigation row on the bottom of the form? As is often the case in Access there are three ways to do everything. You tell me how you enter a new record and I will tell you how to grab the PK for inclusion into other tables as the FK.
Privateer
 

Users who are viewing this thread

Back
Top Bottom