|
|
Question : MS Access - Using Automatic Resizable (Adjusting) Forms
|
|
Hello, I would like to set the formatting of the forms, subforms, text boxes and tab controls in such a way that, the size of all of them are enlargeable and shrinkable according to their contents.
For example I have subform which brings information. I want the size of this subform adjust itself automatically depending the size of the data inside (in this case the number of lines, or height)
I would be gratefull if u can provide any help.
|
Answer : MS Access - Using Automatic Resizable (Adjusting) Forms
|
|
so you figure out how many pixels you need per subform record, multiply that by the number of records your subform has and set the form / subform sizes as follows:
me.height = intPxPerRec * intRecLength - me.sfrm_Stuff.Height 'Make the form grow the same amount as the subform will grow
me.sfrm_stuff.Height = intPxPerRec * intRecLength 'Make the subform grow to accomodate all records
|
|
|
|
|