Is it possible to have 3 linked subforms?

G

Gogs

I'm having dificulty getting 3 linked subforms to operate correctly. I
have a main form with an artist look up combo in the form header. On
that form I have a subform#1 that is a list of the music titles
(fldMusicID) by the artist (fldVocalistID) selected in the combo.

Subform#2 then details all the discs which contain a recording of the
music title selected in subform#1. I setup subform#1 as a child to the
main form via the fldVocalistID.

I then added a hidden textbox named MyLinkTextbox1 to the main form,
set the LinkMaster property of subform#2 to [MyLinkTextBox1] and the
LinkChild property to
fldMusicID.

This all works fine, with the records moving in sync. The problem
comes when I try to add subform#3, in which I want to show all the
track titles for the disc selected in subform#2.

I tried the same approach as for subform2. I have a hidden textbox
([MyLinkTextBox2]) on the main form,and have set the LinkMaster
property of subform#3 to [MyLinkTextBox2] and the LinkChild property
to fldDiscID. But this doesn't work.

I am running Access 2007 - is it possible to have 3 linked subforms?

Thanks for any help.

Gordon
 
R

ruralguy via AccessMonster.com

What do you have as the ControlSource of the MyLinkTextBox2 control?
I'm having dificulty getting 3 linked subforms to operate correctly. I
have a main form with an artist look up combo in the form header. On
that form I have a subform#1 that is a list of the music titles
(fldMusicID) by the artist (fldVocalistID) selected in the combo.

Subform#2 then details all the discs which contain a recording of the
music title selected in subform#1. I setup subform#1 as a child to the
main form via the fldVocalistID.

I then added a hidden textbox named MyLinkTextbox1 to the main form,
set the LinkMaster property of subform#2 to [MyLinkTextBox1] and the
LinkChild property to
fldMusicID.

This all works fine, with the records moving in sync. The problem
comes when I try to add subform#3, in which I want to show all the
track titles for the disc selected in subform#2.

I tried the same approach as for subform2. I have a hidden textbox
([MyLinkTextBox2]) on the main form,and have set the LinkMaster
property of subform#3 to [MyLinkTextBox2] and the LinkChild property
to fldDiscID. But this doesn't work.

I am running Access 2007 - is it possible to have 3 linked subforms?

Thanks for any help.

Gordon
 
G

Gogs

The control source for MyLinkTextBox2 is "=[frmDiscographySubform2].
[Form]![fldDiscID]".
 
R

ruralguy via AccessMonster.com

Have you made it visible to see if it contains the correct data? What you
are doing should work. Is frmDiscographySubform2 the name of your
SubFormControl AND the SubForm it displays? They do not have to be named the
same and you need the SubFormControlName in the syntax.
The control source for MyLinkTextBox2 is "=[frmDiscographySubform2].
[Form]![fldDiscID]".
 
G

Gogs

Hi RG,

The hidden text box for subform#3 was indeed showing the correct value
for the linking field (fldDiscID) but your comments prompted me to
experiment further. I changed the name of the text box from
MyLinkTextBox2 to fldDiscID and lo and behold, it worked - now all 3
subforms move in sync.

I'm no Access expert but I've been using Access for years - its
"idiosynchracies" never fail to surprise me!

Thanks for guiding me through this one.


Gordon
 
R

ruralguy via AccessMonster.com

Glad you got it sorted Gordon. Thanks for postng back with your success.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top