Solved

MS Access Parent Child form and Link fields.

Posted on 2016-09-14
7
37 Views
Last Modified: 2016-09-14
My question is related to MS Access forms, particularly to Link fields between Parent and Child form – (bound forms).

Will change of value of link field on Parent form change automatically value of link field in child table ?
0
Comment
Question by:Taras
7 Comments
 
LVL 2

Accepted Solution

by:
Antonio Salva Ripoll earned 500 total points
Comment Utility
Hi.

If I understood your question, you are asking that if you change the value of the parent form link field, the subform link field changes.

In this case the answer is YES.

The link fields are used by the subform to filter the records from the recordsource, and sow only the record that matches the parent form link field.

And if you can add records to the subform, and you don't have any related record in the subform, you can add a new one, and the link field will be filled automatically whith the same value of the link field in the parent form.

In the other way, if you change the link field in the subform, then you are assigning that record data to other parent record. So, changing the value in the subform don't change the parent link field.

Best regards.

Antonio.
0
 
LVL 49

Expert Comment

by:Gustav Brock
Comment Utility
The answer is no.

If you change the value of the master field(s), it just changes the filtering on the child field(s). That's the primary purpose of the master/child link fields.

If the tables of the forms are related and the master field is a primary key, the current value of this will be used as the default value of the child field (the foreign key) when entering new records in the subforms.

/gustav
0
 

Author Closing Comment

by:Taras
Comment Utility
Thank you.
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 

Author Comment

by:Taras
Comment Utility
So what is proper answer? Yes or No??
0
 

Author Comment

by:Taras
Comment Utility
If the Gustav answer is right it means that I allocate points to wrong person.
0
 
LVL 2

Expert Comment

by:Antonio Salva Ripoll
Comment Utility
Hi @Taras.

Both answers, the Gustav one and mine are correct.

The link fields are the way to get a Master/Detail view. I said that the answer is yes because you change the recordsource filter.

And if you add a new detail record, the related field (the linked one) in the subform (and the subsequent table) is added automatically.

Best regards.

Antonio.
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
The correct answer is No ... Gustav's answer.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now