View Full Version : Growing / Shrinking on screen


Steven McEwan
04-03-2002, 10:35 AM
Hello,

When using continuous forms in form view, is there a way to make the sizes of controls vary on screen according to the volume of content. The "can shrink" and "can grow" options work when the document is printed but not (as far as I can tell) on screen.

Thanks for any help.

Steve

Shep
04-04-2002, 09:28 AM
From Access Help:

You can use the CanGrow and CanShrink properties to control the appearance of sections or controls on forms and reports that are printed or previewed.

Notes
·These properties affect the display of form sections and controls only when the form is printed or previewed, not when the form is displayed in Form view, Datasheet view, or Design view.

Shep

Steven McEwan
04-04-2002, 10:02 AM
Shep,

Many thanks for your reply.

I agree that "can shrink" and "can grow" will not work. I am interested in whether it is possible to use either conditional formatting (in Access 2000) or some code to generate the same effects as "can shrink" and "can grow" on screen.

Thanks again.

Steve

Shep
04-04-2002, 10:30 AM
Well you could easily, depending on the length of the control's text, size (width) the control programatically. This would be fine for TextBoxes, ListBoxes and ComboBoxes. I am less sure whether the number of rows is calculable, for example, in a Memo field.

I am not familiar with 'conditional formatting' though, sorry. Hopefully, someone else can address that possibility.

Shep

Shep
04-04-2002, 05:46 PM
Steven, I happened upon this. Counting lines in a memo field IS possible, as is resizing any and everything imaginable.

Looks like quite a job to incorporate it into a database, but you might be able to make some use of it.
http://www.lebans.com/DownloadFiles/TextHeightWidth.zip

Regards,
Shep

Steven McEwan
04-05-2002, 04:25 AM
Shep,

That is exactly what I wanted. Thank you very much for your time in finding it.

I agree that it is quite advanced - but then I did not expect it would be simple. The fact that the same functions apply to reports is also extremely helpful.

Thanks again.

Steve