Sorry you had trouble with adjusting the form height using code
Attached is a very simple form/subform example showing how the height of a subform can be changed at the same time as it is made visible / hidden.
In addition, the position of two other controls is moved up/down accordingly as is the height of the main form
When shrunk, the subform height has been set to zero ... even though it contains controls
The 2 forms just happened to be the first I had to hand from other posts
There's no significance to either of them
This was good stuff. I was able to implement your code and make my form grow and shrink based on the choices in the combobox in the header of the main form called frm_labtestinput which used a query called qry_labtestinput.
I took all of the lines, labels, and fields that I wanted to show and hide and put them in their own form called frm_usbinput and added that form to the main form as a subform. (although I have not been able to make the actual subform appear)
Now I don't know much about subforms but from what I have been reading... subforms are typically used in datasheet view and are maybe not designed for data input?
Anyway... I did read that typically the subforms are related to a different table than the main form.
So here is what I am using:
Main form - choose a record from the combobox in the header and it populates the PO number and part number fields in the detail section leaving more fields that need to be filled out to update the data for that chosen record.
Now the usb data subform is in the middle of these fields on the main form and ALSO needs to have data updated in the fields that corresponds with that PO number and part number choice.
This data is all stored in the same table though... do I need to split it up and store the USB data in it's own table? I have a feeling I do because I can't figure out how to link the two forms together with just one table. I would rather now split it into two but I will if I have to.
I would need some advice on how to properly structure the new table so both can relate to each other.
In the sample database you attached the main form has no data input... only the subform... mine needs both but it is not creating new records... it is only updating existing records.