473,387 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Link Child Link Master Not Working

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
3 8441
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tim | last post by:
I've been working on this for over a week now, and just can't get this figured out. Hoping one of you gurus can help me out here. I have an xml data island that I'm representing on an htm page as...
2
by: Deborah V. Gardner | last post by:
I am using Access 97 and have had a problem joining a main form and a subform. I have a main form and a subform. The data source on the main form is a SELECT statement referring to three tables....
1
by: cefrancke | last post by:
I have the classic Master/Child subform setup in an Access 2000. Where the child subform properties are setup to connect the master subform. The master subform has it's "OnCurrent" event set up to...
2
by: Chewy1026 via AccessMonster.com | last post by:
Is this even possible. To be able to have a subform where the Master field on the main form is linked to the subform via 1 child field OR another? So the table for the main form, can be matched...
6
by: astro | last post by:
I'm working through the binder stuff trying to get a handle on it... I have setup a master-detail dataset and have a couple of textboxes from the master along with a datadgrid for the child data....
13
by: paquer | last post by:
Ok' I have 2 tables. The first being my main table where each record has a 'FigureID' txt box. (Indexed - No duplicates) The second being my sub table where reporting is entered for these...
11
imrosie
by: imrosie | last post by:
Hello Experts This is a hard one (I still speak newbie). An expert may think it's not a big deal, but, I am trying to replace my Main Order form with a subform because of the following: ...
1
by: Yubin | last post by:
Hello, I'm new to the forums and I wasn't able to find anything in my searches so here we are. I have a DB with a many-2-many relationship. I have a form that has 3 comboboxes: Project #, Last...
12
by: banderson | last post by:
Hello all, I am hoping that you can help me with a problem that has occurred numerous times on various forms in the two databases that I am working on. When I first add a subform to a form linking...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.