View Single Post
  #4  
Old June 2nd, 2010, 10:29 PM posted to microsoft.public.access
Peter Hibbs
external usenet poster
 
Posts: 871
Default Controlling text fields in access 2002

You could easily just change the Height parameter of the Text box
control when it gets the focus and then change it back when it loses
the focus. Something like this :-


Dim vHeight As Long

Private Sub YourTextBox_GotFocus()
vHeight = Me.YourTextBox.Height
Me.YourTextBox.Height = 1500
End Sub

Private Sub YourTextBox_LostFocus()
Me.YourTextBox.Height = vHeight
End Sub


where YourTextBox is the name of your text box control. Change the
figure 1500 (Twips) to the value you need for your box when it has the
focus. If you know the height of the Text box control then you could
just use that figure in place of the vHeight variable which would not
then be needed.

Peter Hibbs.


On Tue, 1 Jun 2010 00:50:01 -0700, Gasket
wrote:

I'm having some problems making my data input form nicely usable. First of
all I'd like the text field to grow bigger when written on it, instead of
scrolling as it does now. Is it possible to make the active field grow on top
the others and then go back to it's defined size when another field is
activated? I have a lot of fields in my form and I can't enlarge them
anymore. And the fields might contain a lot of text or none at all.