Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-09-2015, 09:55 AM   #1
Scolton
Newly Registered User
 
Join Date: Mar 2015
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Scolton is on a distinguished road
Subforms master/Child link

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.

Scolton is offline   Reply With Quote
Old 04-09-2015, 10:33 AM   #2
plog
Banishment Pending
 
Join Date: May 2011
Posts: 9,490
Thanks: 12
Thanked 2,303 Times in 2,254 Posts
plog is a jewel in the rough plog is a jewel in the rough plog is a jewel in the rough
Re: Subforms master/Child link

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?
plog is offline   Reply With Quote
Old 04-09-2015, 11:28 AM   #3
Scolton
Newly Registered User
 
Join Date: Mar 2015
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Scolton is on a distinguished road
Re: Subforms master/Child link

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.
Attached Images
File Type: png docentinfo.png (17.4 KB, 79 views)
File Type: png Inhoud.png (18.0 KB, 68 views)
File Type: png Relaties.png (16.8 KB, 76 views)

Scolton is offline   Reply With Quote
Old 04-09-2015, 11:40 AM   #4
plog
Banishment Pending
 
Join Date: May 2011
Posts: 9,490
Thanks: 12
Thanked 2,303 Times in 2,254 Posts
plog is a jewel in the rough plog is a jewel in the rough plog is a jewel in the rough
Re: Subforms master/Child link

Quote:
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.

plog is offline   Reply With Quote
Reply

Tags
acces 2013 , master child link , record creation , subforms

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Link Master and Link Child chuckcoleman Modules & VBA 14 02-21-2015 03:04 PM
Revising Data In Link child & Link Master Field duffy Forms 2 04-19-2009 05:35 PM
Subforms and Master/Child Links. LiamIngram Forms 4 01-09-2002 09:57 AM
Master/Child links on subforms DavePan Forms 1 05-05-2000 08:58 AM
[SOLVED] Link child Link Master problem daveyboy Forms 1 12-19-1999 12:26 AM




All times are GMT -8. The time now is 06:00 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World