472,371 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,371 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 8291
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

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.