Nested subforms

DaveMere

Registered User.
Local time
Today, 16:06
Joined
Sep 18, 2002
Messages
63
Hi all.

I have a data structure consisting of three cascading one-to-many relationships;
Job -< Batch -< Treatment -<Observations.
So, a job can have many batches, each batch can have many treatments and each treatment has many observations over time. I attempted to construct a series of nested subforms, but Access seems to limit the number of nested subforms you can have to two. Is there any way around this? Or does anyone have any other suggestions for how I approach this?

Thanks,

DaveMere
 
Dave,

I don't know about nested subforms. I wouldn't want to design anything like that. But I would have a main form showing the Job and a subform showing the Batches. Then have pop-up forms, selected by Command Buttons on the Mainform, to show the treatment and Observations. The user would select the Batch record on the subform and then choose either the Treatment button or Observations Button.

On the OnClick property of each button have a bit of code that says something like -



DoCmd.OpenForm "Treatments",acNormal,,"[BatchNo]=Forms!MainForm!SubForm.Form.BatchNo"



and for the Observations pop-up form -



DoCmd.OpenForm "Observations",acNormal,,"[BatchNo]=Forms!MainForm!SubForm.Form.BatchNo"

These pop-up forms will be either Continuous forms or another mainform/subform with a datasheet view.

HTH

Dave E
 
Last edited:

Users who are viewing this thread

Back
Top Bottom