By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,572 Members | 959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,572 IT Pros & Developers. It's quick & easy.

Link Child Link Master Not Working

P: n/a
I have a unbound form with a tab control with four tabs in an Access 97
database. On each tab I have a sub form each form on the sub forms is bound
to its own table. Each table has a field that can link them all together. I
have put an invisible unbound control on the master form that gets populated
on open. I set the link child and link master of each sub form to the
unbound control on the master form. When the form opens all the subforms
show are the first record in their underlying tables and not what the field
on the master should be linking.

On open of the master I have been successful in setting the record source of
each sub form to show what I want but I would like the link child and link
master to do it's job. Any help would be much appreciated.

Regards,
Mark
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Mark. What you are aiming to do makes perfect sense, so it will be
worthwhile taking the time to trace what's going on.

Suggestions to get you started:

1. Timing?
When are you setting the value of these unbound controls? The Open event of
the form would be as early as possible, so try that. Alternatively, you may
be able to just set their Control Source to something like:
=1

2. Data type?
If the values are numeric, try setting the Format property of these unbound
controls to:
General Number
or try Short Date if they are dates. This will help Access understand the
intended data type.

3. Bad names?
Make sure that none of the names used in the
LinkMasterFields/LinkChildFields could be misunderstood as a built-in
property. Bad names include Name (the name of the form), Date (VBA
constant), Section (a property of forms), etc.

4. Dynamically changed?
Under certain conditions, Access will reassign (or even deassign) the
LinkMasterFields and LinkChildFields, so check this has not happened. While
the form is open and displaying the problem, open the Immediate Window
(Ctrl+G) and check the values by entering something like this:
? Forms!MyForm![MySubformControlName].LinkMasterFields
Does it contain the expected name?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mark C" <he******@yahoo.com> wrote in message
news:md********************@comcast.com...
I have a unbound form with a tab control with four tabs in an Access 97
database. On each tab I have a sub form each form on the sub forms is bound
to its own table. Each table has a field that can link them all together. I
have put an invisible unbound control on the master form that gets
populated on open. I set the link child and link master of each sub form to
the unbound control on the master form. When the form opens all the
subforms show are the first record in their underlying tables and not what
the field on the master should be linking.

On open of the master I have been successful in setting the record source
of each sub form to show what I want but I would like the link child and
link master to do it's job. Any help would be much appreciated.

Nov 13 '05 #2

P: n/a
Mark,

A close reading of your sentence -
I set the link child and link master of each sub form to the
unbound control on the master form.
makes me wonder...

It sounds like you are setting the 'Link Child Fields' to the same value as
the 'Link Master Fields', both being set to the name of the invisible
unbound control. If so, this is your mistake. The 'Link Child Fields' must
be set to the name of a control or access field on the form displayed in
each subform.

Can this possibly be your problem????

BTW, it is possible to have a single subform control whose 'Source Object'
gets dynamically changed to the name of the form you want to display (based
on whatever criteria, be it a tabl controls setting, radio buttons, passing
of time, what have you). I think (not sure) that this saves in some
overhead as only the form that the user cares to see has its records loaded.

Regards,

--
Malcolm Cook - me*@stowers-institute.org
Database Applications Manager - Bioinformatics
Stowers Institute for Medical Research - Kansas City, MO USA

"Mark C" <he******@yahoo.com> wrote in message
news:md********************@comcast.com... I have a unbound form with a tab control with four tabs in an Access 97
database. On each tab I have a sub form each form on the sub forms is bound to its own table. Each table has a field that can link them all together. I have put an invisible unbound control on the master form that gets populated on open. I set the link child and link master of each sub form to the
unbound control on the master form. When the form opens all the subforms
show are the first record in their underlying tables and not what the field on the master should be linking.

On open of the master I have been successful in setting the record source of each sub form to show what I want but I would like the link child and link
master to do it's job. Any help would be much appreciated.

Regards,
Mark

Nov 13 '05 #3

P: n/a
Thank you Allen and Malcolm,

My problem was that the control on the main form was not named the same as
the controls on the sub forms. I was putting the Link Child and Link Master
fields with the same name. Once I changed accordingly all worked fine.
That's what I get for working 12 hours a day. Thank you both for the advice.

Regards,
Mark

"Mark C" <he******@yahoo.com> wrote in message
news:md********************@comcast.com...
I have a unbound form with a tab control with four tabs in an Access 97
database. On each tab I have a sub form each form on the sub forms is bound
to its own table. Each table has a field that can link them all together. I
have put an invisible unbound control on the master form that gets
populated on open. I set the link child and link master of each sub form to
the unbound control on the master form. When the form opens all the
subforms show are the first record in their underlying tables and not what
the field on the master should be linking.

On open of the master I have been successful in setting the record source
of each sub form to show what I want but I would like the link child and
link master to do it's job. Any help would be much appreciated.

Regards,
Mark

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.