Autosize of text box

  • Thread starter Thread starter Nandini
  • Start date Start date
N

Nandini

I have created a bibliographic database using Access 2003. Here I designed
some forms having text box control. I want to know the exact visual basic
code so that these text boxes can be resized automatically in respect of size
of the text as appeared in different records.
With regards.
 
In Form Current event:
MyTextBox.Width = <size in twips>

There are 1440 twips to the inch. You will have to calculate needed witth
based on font and number of characters. Not always an exact science as
different characters take up different space unless you use a fixed-with font
like Courier.

-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
Back
Top