View Full Version : Changin textbox height in VBA


jaydwest
06-07-2010, 04:51 AM
I have a client that wants boxes around textboxes on reports (Clients !@#$%^&*). I have set the border color of the textboxes to black and they show up just fine. On course with one exception. The fields have the cangrow property set and so one field with comments will increase in size. I have gone into the detail_onFormat event and tried to set the height of all textboxes = height of comments textbox. But alas the height property appears to be the fixed height entered into the height property. I do not seem to see a "Formatted Height" property that I can use.

Any suggestions.

I'm using MS Access 2007:D

JamesMcS
06-07-2010, 05:35 AM
Hmmm. I'm not sure if the actual height property changes when the box grows does it? Otherwise you'd be left with a huge box next time you opened the report.

It's a bit complicated but I guess you could work out the height of a one-line text box, the number of lines going into the growing text box, then in its afterupdate, set the height of the other text boxes to numberoflines x 1-line-textbox height?

darbid
08-25-2010, 04:15 AM
You most likely have done something else with this now.

In my searching I have come accross this thread.

I have a similar problem and am looking at this here

http://www.lebans.com/cangrow.htm