473,796 Members | 2,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8480
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
LinkMasterField s/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
LinkMasterField s 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![MySubformContro lName].LinkMasterFiel ds
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******** ************@co mcast.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******** ************@co mcast.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******** ************@co mcast.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
6484
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 an expandable menu. Got that working, but now I need to add sorting and searching abilities to the menu. I am hoping to do this with xsl but can't get it to work. Is this because of the way I've formed my xml, having the children within the...
2
21056
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. The subform's data source is a table. When I try to link the Child and Master fields, I get the message "Can't build a link between unbound forms." I have tried typing in the common fields and it still does not work.
1
1283
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 requery the child. All is good in Access 2000. When this app is run in 2003, the child subform doesn't display the related records. New records dont take either.
2
3766
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 to 2 different fields (one or the other). Can this be done with only 1 subform? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200510/1
6
1787
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. I have a navigation pallete with the usual arrows. All arrow btn's are handled by the same handler. Before moving off the current record I do the following:
13
8299
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 Figures. Sometimes more than one at a time. I have 4 'FigureID' txt boxes on this subtable.(All Indexed - Duplicates OK) When I set the Master/Child link for the first FigureID on the Subtable I have no problems.
11
6665
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: Original form was based on a query of 2 tables (Order and Customers), the subform was based on table OrderDetail(productname, quantity, discount, unitprice). I was experiencing autonumber problems when attempting to start a new order, because of the inner...
1
8640
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 Name, Active(Yes/No) I have a subform that uses Project# as a Child and Master link. I want to use all three exclusively to give the user the option to search using any ONE of the three, but when I add all three to the Child and Master link fields no...
12
3034
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 child and master fields (primary key and foreign key), the subform will automatically update when the master field on the main form is changed (it is in a combo box). However, when I work more on the form - making it a bit more complicated, adding...
0
9680
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10455
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10228
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10173
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10006
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.