"Grow" on a Form: is this possible?

C

Chris

I have a detail table with a memo field. This table's
records are presented to the user via a "continuous
record" subform. I would love it if for each record I
could automatically "grow" the height of the memo field's
text box to show all the data within the field (within a
certain limit just to keep things manageable). Ideally,
I'd do this for all rows within view but I don't think
that is possible, so at least I'd "grow" the text box
based on the record that has focus. Any ideas? I'm sure
there's some kind of equation to do this (length of string
factored into width of text box, etc.) but math just isn't
my strong suit. Any ideas?
 
M

Marshall Barton

Chris said:
I have a detail table with a memo field. This table's
records are presented to the user via a "continuous
record" subform. I would love it if for each record I
could automatically "grow" the height of the memo field's
text box to show all the data within the field (within a
certain limit just to keep things manageable). Ideally,
I'd do this for all rows within view but I don't think
that is possible, so at least I'd "grow" the text box
based on the record that has focus. Any ideas? I'm sure
there's some kind of equation to do this (length of string
factored into width of text box, etc.) but math just isn't
my strong suit.

You can not make different rows on a continuous form display
different heights.

I suggest that you use a separate text box in the form's
header or footer section to display the memo field.
Alternatively, make the continuous form a subform on an
(unbound?) main form and use a synchronized text box on the
main form to display the memo field.

A quick and dirty technique to display the entire memo field
is to just tell your users to click in the memo field and
hit Shift + F2 to pop up the Zoom Box.
 
C

Christopher Caswell

Thanks, Marshall. I know that it's a pipe dream to vary the height of a
text box differently for each record, but as I mentioned, I'd be willing to
limit this functionality to the record which has focus (upon form_current).
What would be the equation to factor the length of the string and the width
of the text box in order to set the minimum text box height that would show
the entire contents of the text box? I'd resize the control and detail
section of the form as the user moved into each record. Your other ideas
are good, but 1) real estate is limited for placing other text boxes/labels
on the form, and 2) the field zoom key (Shift-F2) is known, but a) the
pop-up it opens isn't resizeable, and b) all text is selected (and thus
vulnerable for deletion in edit mode) via this method.

Chris
 
M

Marshall Barton

Christopher said:
Thanks, Marshall. I know that it's a pipe dream to vary the height of a
text box differently for each record, but as I mentioned, I'd be willing to
limit this functionality to the record which has focus (upon form_current).
What would be the equation to factor the length of the string and the width
of the text box in order to set the minimum text box height that would show
the entire contents of the text box? I'd resize the control and detail
section of the form as the user moved into each record. Your other ideas
are good, but 1) real estate is limited for placing other text boxes/labels
on the form, and 2) the field zoom key (Shift-F2) is known, but a) the
pop-up it opens isn't resizeable, and b) all text is selected (and thus
vulnerable for deletion in edit mode) via this method.

Like I said, no can do on a continuous form.

If you're willing to limit youself to single form style,
then you can use Stephen Lebans' TextHeightWidth
function to determine the size that the text box needs to
be. I believe that he even has an example of a can grow
text box on a form at www.lebans.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top