Form Screen

L

learning_codes

Hi,

I created a box on the form. The box is the memo where I view only
and unable to edit. I just want to know how to reduce or expand the
box depending the number of characters. Is there a code to adjust
the size of the box depending the characters ?

Your help would be much appreciated.

Thanks
 
F

fredg

Hi,

I created a box on the form. The box is the memo where I view only
and unable to edit. I just want to know how to reduce or expand the
box depending the number of characters. Is there a code to adjust
the size of the box depending the characters ?

Your help would be much appreciated.

Thanks

This is easy enough on a report. Set the control's CanGrow proeprty to
Yes. Also set the report section's CanGrow property to Yes.

On a form in display view, however, this feature is not available.
You can press Shift + F2 to display the control value in a Zoom Box.
 
L

Linq Adams via AccessMonster.com

Leban's code works well, as all his hacks do. The problem is, as written, you
have to leave enough space on your form for the textbox to expand into,
otherwise any controls immediately below the memo field will be hidden.
Unless you have enough room to do this, Fred's suggestion of using Access'
Zoom feature is probably your best bet as it allows the expanded text to
shrink, leaving underlying textboxes visible. Another variation would be to
invoke the zoombox thru code. This code:


Private Sub YourMemoBox_DblClick(Cancel As Integer)
DoCmd.RunCommand acCmdZoomBox
End Sub

will expand the memo filed box when the user double clicks on the field. The
field has to be enabled for this to work, but it can be locked, if need be,
to leave it "read-only."
 
Top