how to make the textbox "can grow" on a data entry form ?

  • Thread starter Thread starter chuaby
  • Start date Start date
C

chuaby

Hi

i have a data entry form which display a field from database. There are
some texts that are longer and need to wrap to 2-3 lines and some are
short 1 liner.

The cangrow property works if we preview the form for printing but
unfortunately not when we preview for data entry. If i set it to 2-3
lines, the 1 liner appears wasting alot of space. May i know is there
anyway to overcome this restrcition ?

Thank you
Best Regards
Boon Yiang
 
Boon,
Can Grow only applies to reports, or direct printing of a form. It has no function in
Form View.
You could use the on OnCurrent event of the form to determine the length of the string
in the text control, and adjust the hieght "on the fly". (Also needed on the AfterUpdate
event of the control)

Or set up the text control for a DoubleClick that would cause the Zoom box to pop up
and show all the text... but just when needed.
DoCmd.RunCommand acCmdZoomBox

Try a Google Groups search "CanGrow" "Form view". I would think there would be many
methods and suggestions to try to work-around this problem.

--
hth
Al Campagna
Candia Computer Consulting
Microsoft Access MVP - Candia, NH USA
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Hi

i have a data entry form which display a field from database. There
are some texts that are longer and need to wrap to 2-3 lines and some
are short 1 liner.

The cangrow property works if we preview the form for printing but
unfortunately not when we preview for data entry. If i set it to 2-3
lines, the 1 liner appears wasting alot of space. May i know is there
anyway to overcome this restrcition ?

Thank you
Best Regards
Boon Yiang

Another alternative to the ones already mentioned is to use an event of
the text box, probably its DblClick event, to open the built-in "zoom
box". For example,

Private Sub txtMyBigField_DblClick()

RunCommand acCmdZoomBox

End Sub

Note that this is really just the same as pressing Shift+F2 while the
text box has the focus.
 
Dear Dirk:
Note that this is really just the same as pressing Shift+F2 while the
text box has the focus.

Ooh! That's neat! Don't know how I've missed learning about / memorizing
that shortcut, but I'm going to make a point of using it 20 times a day for
a week so it really gets burned into the 'ol brain... .

Thanks!
Fred
 
Back
Top