Autosize

kirkm

Registered User.
Local time
Tomorrow, 02:52
Joined
Oct 30, 2008
Messages
1,257
Do any access2003 controls have autosize property ?

I want to display some text in a text box and set it's width to the widest line to prevent wordwrap. I was going to loop through getting each lines width from autosize, but can't find it.

If autosize in not supported, what other method might work?
 
If you're using a datasheet, you set the width to -2(I think its 2). If it is a standard form, you can anchor the control so it stretches across the screen in Access 2007 and up, but that doesn't really answer your question. If you want to go through the trouble, you can test the length of the data and set the width of the control to an appropriate value, but this would probably be cumbersome to get right.
 
a form is interactive, unlike a report - so it doesn't matter so much to resize a form. you can always expand the contents of a form control to see the data.
 

Users who are viewing this thread

Back
Top Bottom