Can Grow property

S

Shelly

I have a text field on a form. I want it to grow and
wrap the text if it's longer than the space provided. I
set the can grow property to yes and when I print it will
work properly, but on the screen it doesn't. I'm in
Access 2000, am I doing something wrong or is this how it
works?

TIA,
Shelly
 
D

Dirk Goldgar

Shelly said:
I have a text field on a form. I want it to grow and
wrap the text if it's longer than the space provided. I
set the can grow property to yes and when I print it will
work properly, but on the screen it doesn't. I'm in
Access 2000, am I doing something wrong or is this how it
works?

Unfortunately for you, that's how it works: CanGrow only applies to
printing, not the onscreen display of the form. It is possible to use
fairly complicated code to figure out how big a text box must be to fit
the text inside it, and then resize it to fit. I think Stephen Lebans
has a sample at www.lebans.com. For me, though, it has never seemed
worth it; I'd just make the text box to a reasonable size to start
with, and let wrapping and scroll bars take care of the rest.
 
S

Shelly

Thanks, Dirk. I was 99% sure that was the answer, but
thought I would double check.

Shelly
 
S

Stephen Lebans

Hey DIrk,
it's very easy to do this for Forms in single view. The OP can look
here:
http://www.lebans.com/textwidth-height.htm
TextHeightWidth.zip is a replacement for the Report object's TextWidth
and TextHeight methods. It is multiline aware and can work in both
Report and Form views. Includes a sample report to show you how to
autosize individual controls with different formatting on the same line
to simulate RTF style text.



History

Version 4.5: Increased accuracy of auto sizing for a ListBox.

Version 4.3: Added sample Form to demonstrate auto sizing for a ListBox.

Version 4.2: Added report to demonstrate auto sizing to mix text
formatting on one row.


--

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

Anne

I have had problems with this many times. Perhaps someone can give me some
inside into how to use these downloads. I keep getting you do not have
permissing to use this. Even if I use the generic access icon, the program
keeps asking for my login name and then tells me I do not have permissing to
use the file. Tell me what do I have to do, to be able to look at this file?
Anne
 
S

Stephen Lebans

The only time I have seen this issue is when you attempt to open an
older version of Access from within a newer version of Access directly
from the ZIP archive without converting it. Simply save the MDB from the
ZIP file to your hard drive, open and convert the MDB to your newer
version of Access then Compile the project.

--

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

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