Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic subform creation

Status
Not open for further replies.

rewdee

Programmer
Aug 17, 2001
295
US
Okay this is a toughie!!!

I have a form that has many types (groups) of equipment and within the group the individual pieces of equipment reports its readings. For example, a group would be Air Monitors and they may have AirMonitorA, AirMonitorB, etc. The groups and individual pieces of equipment are constantly changing hence my static form is constantly in maintenance mode. I want to create a main form with an undetermined number of subforms (groupings) with the individual pieces of equipment within the subform. That way, as long as the database is updated the groupings will display the current pieces of equipment in that group and its readings.

As I see it-- the steps outlined would be--

Code:
Get the groupings the user wants-Default All--
Iterate through the groupings
For each grouping
Create  Subform--could be generic subform previously created in continuous form
set subforms recordset set to grouping or filter to this grouping
place subform on Main sheet--make sure no overlapping
Next grouping

What I'm a little hesistant about is the creating the dynamic subform control on the main form and its placement. Has anyone done something similiar? Can you share some code or point me to an article that will help?

Thanks,
Rewdee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top