Nested subform (1 Viewer)

PeterWieland

Registered User.
Local time
Today, 15:51
Joined
Sep 20, 2000
Messages
74
I have a main form (Form 1), with 2 combo boxes and a subform. The record in the subform is dependent on the 2 combo boxes. This works fine.

I have added a subform to the subform, the record displayed should be selected by a combo on the first subform. This doesn't work. When the first subform opens after the Form 1 combos are clicked, I am asked for the parameter for the linked field in the 2nd subform, and when I click the combo on the first subform, the contents of the record for the 2nd subform do not show.

However, if I open the 1st subform directly (entering the parameters manually that would have been taken from the parent), the 2nd subform works perfectly!

Any ideas?

The database is attached.
 

Attachments

  • Trallwm.zip
    35.3 KB · Views: 105

MarkK

bit cruncher
Local time
Today, 07:51
Joined
Mar 17, 2004
Messages
8,183
Only the main form appears in the Forms collection, and thus you can't reference a subform using the Forms!SomeForm syntax.
In your case you don't need to write a query for the subforms. Base your forms on the whole table and allow the LinkChildFields and LinkMasterFields properties of the subform control determine the records that appear.
 

PeterWieland

Registered User.
Local time
Today, 15:51
Joined
Sep 20, 2000
Messages
74
Thanks Lagbolt, I knew it would be something simple!
 

Users who are viewing this thread

Top Bottom