SubForm linked to subform

Cereldine

Registered User.
Local time
Today, 02:30
Joined
Aug 4, 2005
Messages
71
Hello in the grand scheme of things i would like to achieve the following,
Have a main form with a continuous sub form[1stSubform] linked to it. I then have a second continuous sub form[2ndsubform] located on the main form, I would like to link the values of [2ndsubform] to the value selected in the continuous [1stsubform].

I can link the two together using following in the masterlink field
[1stSubForm].form![inspectionID]

When i select a record within the first subform nothing happens, however if i move to the next record on the main form the 2ndsubform values do change (to the related value in 1stSubform).

How do i get the 2ndsubform values to be driven by the selected record in the first subform rather than simply its first record?


ps i have tried the following in [1stSubform] on current and it brings up an error
Me.Parent![2ndSubform].Requery

thanks
 
If you have got subform in subform, 1stsubform can't be continuous, only
2ndsubform can be continuous.
Look at "DemoSubSubA2000.mdb".
 

Attachments

Have a look at the attached sample db.

It has;

Main Form
subform1
subform 2

To see how they work have a look at the code behind the first subform.
 
Last edited:
Hi Cereldine,
What you have done *should* work! What do you have for the LinkMasterField of 1stsubform? You may want to try a hidden TextBox on the MainForm with a ControlSource of: =1stSubForm.form!inspectionID and point to the TextBox with the LinkMasterField of 2ndSubFormControl. Sometimes Access can be stubborn that way.
 
yeah thanks for that ansentry, i was almost there had managed to get it to work if i pointed to a textbox on the form and used gotfocus procedure. Works even better with oncurrent, the only thing i could of been missing was that bit or error trapping i guess, cheers once again
 

Users who are viewing this thread

Back
Top Bottom