Click image for larger version. 
<br /><script async src=
Name: equipmentfinalform.png  Views: 11  Size: 101.0 KB  ID: 22804" class="thumbnail" style="float:CONFIG" />


Here is a form I've built recently. It works great. Its a form which is bound to a query which contains tblEquipment and several lookup tables. The header is used to add new records or make changes to existing records. The subform is unbound and it displays all records in tblEquipment. The subform and main form (in header) is filtered by the search form in the footer.

Problem is I need to work with sub equipment. By that, I mean cards/modules for some of our switches. Because one switch can have many modules, cards/modules are in a separate table with a one to many relationship. So I believe I will need either a separate form, or a subform to display them and to allow me to make changes (add/remove/etc).

An idea I had was to place a subform in the header of this form. However not all switches have sub equipment (cards/modules). Adding a subform in the header will take up valuable real estate and limit the amount of records that can be displayed in the subform which is currently shown above.

Sooo, an idea I had was to create a button and when that button was clicked, have VBA code to expand the header, shrink the subform, enable (or unhide) a subform and whatever other controls were needed for equipment with sub equipment.

Or perhaps an even better idea maybe is to place code on OnCurrent of the form and have it unhide controls and change size of the header/subform if the equipment has sub equipment.

...Is that possible? Or would it be so much code its not worth the hassle and perhaps I should just build a separate form? I feel like I'm getting more comfortable with programming that I could give it a shot.