I want to move the controls with VBA
Here’s what I want to do. I have a continuous form that shows customer orders. The continuous form by default will only show one line for each record. On that 1 line show customer name, order date, and other information related to the order – One line per record. I also have a comments field and several other fields for each order. Sometimes the user needs to see the comments and additional fields for all records - either for editing or just viewing. I want to give the user the option of viewing the comments along with the data that is already showing. If he clicks on “show details” then I expand the details section and expand the height of the additional text boxes so he can view them. I have already done this. I put the 3 fields on an additional line in the detail section, set their height properties to some minuscule number so as to make them almost invisible and then set their visibility property to no. This would keep the height of the detail line to show only one line. If the user clicks 'show details' I increase the height of the detail line and set the height and visibility of the controls so they would show on the second line of the details section. Now the user sees 2 lines for each record. If the user doesn’t want to see the details then do the reverse and collapse everything.
Rather than do all of this, I got the bright idea of putting the additional fields on a tab control with no tabs in the page footer section of the form. If the user selected view details then I just would move the tab control to the detail section of the form. For no details, I would move the tab control back to the page footer of the form. I can set the height for the detail section of the form based on the number of lines I want to display for every record.
My one and only question is how do you move a control from one section of a form to another section of the form i.e. Move a tab control form the page footer of a form to the details section
Right now my tab control is the page footer of the form and the height is 0. If the user wants to view details I want to set the height of the tab control to be 0.2083. Right now if I change the height to 0.2083 it will be 0.2083 in the page footer of the form. I want to change the height to 0.2083 and move it to the detail section of the form.