Subforms master/Child link (1 Viewer)

Scolton

Registered User.
Local time
Yesterday, 17:33
Joined
Mar 27, 2015
Messages
12
Hello,

i am building a user creation form.
I have built it with 3 subforms
Subform 1 is voor general information about the user.
Subform 2 is some more specific information about the user
Subform 3 is more info about the same user.

Now when i create a user (record) in subform 1 it gets the primary key lets say 14. Then when i add information in subform 2 i want it to grab the Primary key 14 from subform 1. so that the information which is inputed in subform 2 wil be related to information from subform 1. i hope i am making sense. but how do i create this. i get it working if i make a Main form and then put subform 2 and 3 in a subform and then let them grab the primary key from the main form. but how does this work with 3 subforms and no mainform.

thanks in advance.
 

plog

Banishment Pending
Local time
Yesterday, 19:33
Joined
May 11, 2011
Messages
9,928
Like most things, there's a (hack) way to do it, however I really question your table set up. Your issue really sounds like a table issue, not a form issue. If the data in subform2 is related to subform1, then it should either be in the same table or subform2 should be a subform of subform1.

I think you should put forms aside for a moment and describe your data better. What table feeds each subform and how are those tables related?
 

Scolton

Registered User.
Local time
Yesterday, 17:33
Joined
Mar 27, 2015
Messages
12
oke i have a table which is linked to Subform1 in the table i have general info like name telephone number email etc etc and then in my second table for subform 2 i have the other info like courses that person follows.
In the attachement you can find screenshots from my tables and relations.
I blacked out the records for privacy issues.
 

Attachments

plog

Banishment Pending
Local time
Yesterday, 19:33
Joined
May 11, 2011
Messages
9,928
Subform1 in the table i have general info like name telephone number email etc etc and then in my second table for subform 2 i have the other info like courses that person follows.
With that structure, subform1 shouldn't be a subform, but a main form. Then on it, you should have subform2. When you have a 1-many relationship between tables, the 1 becomes the main form and the many becomes the subform.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom