Text Box Can Grow Property?

M

Max Smart

I've got an important user that doesn't like scroll bars on memo fields;
he wants to see all the text in a memo field like he's used to seeing it
on a legacy Word document. Go figure. Anyway, I set the Can Grow
property of the textbox to yes - but the box doesn't grow. We also don't
want huge, blank text fields. Would someone kindly share a solution to
this dilemma?

Thanks,
Max
 
R

Rick Brandt

Max Smart said:
I've got an important user that doesn't like scroll bars on memo fields;
he wants to see all the text in a memo field like he's used to seeing it
on a legacy Word document. Go figure. Anyway, I set the Can Grow
property of the textbox to yes - but the box doesn't grow.

CanGrow on forms only applies to printing them. Not what you see on screen.
 
M

Mike Painter

Max Smart said:
I've got an important user that doesn't like scroll bars on memo fields;
he wants to see all the text in a memo field like he's used to seeing it
on a legacy Word document. Go figure. Anyway, I set the Can Grow
property of the textbox to yes - but the box doesn't grow. We also don't
want huge, blank text fields. Would someone kindly share a solution to
this dilemma?

You could get the length of the text and estimate how much real estate the
box needs, then set those properties in OnCurrent (or someplace)

I hope you left the word "paying" out of "important user"
 
M

Marshall Barton

Max said:
I've got an important user that doesn't like scroll bars on memo fields;
he wants to see all the text in a memo field like he's used to seeing it
on a legacy Word document. Go figure. Anyway, I set the Can Grow
property of the textbox to yes - but the box doesn't grow. We also don't
want huge, blank text fields. Would someone kindly share a solution to
this dilemma?

In addition to Rick's comments, what are you going to do
when the memo takes more than the available height of the
screen?

If the form can be made taller, then you can use the form's
InsideHeight property to set the form's height to whatever
you want. BUT, you'll have to find a way to keep the bottom
of the form from disappearing off the bottom of the screen.
Maybe there's some API stuff at Stephen Lebans' site
www.lebans.com that can help?).

Given that you can work that out, then you can use Stephen's
TextHeightWidth module to determine the value you need to
set the Height property of the memo text box to.
 
S

Stephen Lebans

Marshall mentioned there is code on my site to allow for Autosizing of
Textbox control's but this will on work for forms in single view. If you
are working with forms set to Continuous view then there is no solution
when simply viewing multiple rows of your table.

Here are a couple of options:
1)
a) Addd a form header or footer
b) Place a large unbound TextBox control in the header/footer.
c) As the user moves their mouse over the relevant TextBox control(s)
fill the unbound TextBox in the header/footer with the contents of the
control the user's mouse is hovering over.
d) Allow the user to edit either the bound or unbound TextBox control
See:
http://www.lebans.com/conformscurcontrol.htm


2) When ever the user clicks in the Textbox in your continuous form
either:
a) Popup another form containing a TextBox linked to the field in
question
or
b) Use DoCmd.RunCommand acCmdZoomBox
This pops open a window containing just the current control's contents
which is the same as pressing Shift + F2
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
M

Max Smart

Thanks to all for your tips. It looks like the company president is
going to have to learn about scroll bars.

Thanks,
Max

"Stephen Lebans"
 
A

Adrian Jansen

So his version of Word doesnt have scroll bars ?

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 

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