I have a Mainform and a subform. The subform is a ‘summary’ form which contains about 30 textboxes with a label for each. Textboxes are arranged on the form as
Label1
Textbox1
Label2 Textbox2 label 3 textbox3
Label4
Textbox4
etc
Each textbox has a function as the controlsource, which looks in other tables and builds a string to display in the textbox.
In a user maintenace area of the app I have note definition form and table which has checkboxes corresponding to each textbox on my subform. The user can ‘define’ notetypes by checking what they want to appear on the subform. When a record is created elsewhere this notetype is stored in the record. Depending on which type of note they open, I want to reference the note definition table and determine what they want to see on the form.
I can set the textfields to visibe=false on my subform, call a function to check the definition table when the form opens, and turn on what I want to see.
I need both the textfields and subform to shrink and grow accordingly. Any visible textbox must grow to size, and all visible textboxes need to show with no gaps above or below. I have code to resize the textfields when they are all visible, however if they are to stay invisible, they do not shrink even if the function used as their control source returns nothing. Setting height=0 on a txtbox before using the resize code I have just opens a blank form.
Is there any way to remove the textbox and label from the form dynamically if they are not supposed to show?
I may be approaching this from the wrong angle and welcome any suggestions.
Label1
Textbox1
Label2 Textbox2 label 3 textbox3
Label4
Textbox4
etc
Each textbox has a function as the controlsource, which looks in other tables and builds a string to display in the textbox.
In a user maintenace area of the app I have note definition form and table which has checkboxes corresponding to each textbox on my subform. The user can ‘define’ notetypes by checking what they want to appear on the subform. When a record is created elsewhere this notetype is stored in the record. Depending on which type of note they open, I want to reference the note definition table and determine what they want to see on the form.
I can set the textfields to visibe=false on my subform, call a function to check the definition table when the form opens, and turn on what I want to see.
I need both the textfields and subform to shrink and grow accordingly. Any visible textbox must grow to size, and all visible textboxes need to show with no gaps above or below. I have code to resize the textfields when they are all visible, however if they are to stay invisible, they do not shrink even if the function used as their control source returns nothing. Setting height=0 on a txtbox before using the resize code I have just opens a blank form.
Is there any way to remove the textbox and label from the form dynamically if they are not supposed to show?
I may be approaching this from the wrong angle and welcome any suggestions.