Avatar of Derek Brown
Derek Brown
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Can Grow

Hi All

I have access 2002 and cannot get the controls on a continuous subform to grow.The controls are in a line with others horrizontally accross the page but when text is entered that over fills an existing control size, the control does not grow?

Help
Microsoft Access

Avatar of undefined
Last Comment
Derek Brown

8/22/2022 - Mon
Rey Obrero (Capricorn1)

the "can grow" and "can shrink" property of the textbox controls only applies in a report not in a form...
ASKER CERTIFIED SOLUTION
Rey Obrero (Capricorn1)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Ess Kay

you have to add some code to expand the control.

use the .height property
Jeffrey Coachman

Is this a true continuous form or a Datasheet form?

Unfortunately the Can grow property in a form only works when the form is actually "Printed"
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Jeffrey Coachman

If you:
Delete this control on the form
Then re-define it as a "Memo" datatype in he underlying table.
Then reinsert the control into the report, the control will have a scroll bar by default, this will allow you to scroll the textbox with out changing the height.

Either that or use a report for this...

There are third party utilities that will do what you are asking, but I don't know if this one case, and this one control are worth it...


Jeffrey Coachman
Jeffrey Coachman

Ignore my post: 37710070.
capricorn1's post covers this...
Ess Kay

if you use a datasheet form you will have to adjust a different property

on the datasheet ir would be the row height set to auto
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Derek Brown

ASKER
Thank you all. Seems clear that the can grow property is not what I expected.
I Have this code that I think will read the text and compare it to the controls width and then increase the height of the control. But it will probably increase the height of all of the controls in the continuous forms and how would it know to increase the control height when a second line of text fills the second line so as to initiate a further increase in height.
    Do While Me.TextWidth(Me.Control) > Me.Control.Width
        Me.height = Me.height + 1
        x = x + 1  
            Exit Do
    Loop
Me.Control.height  = Me.Control.height + x

Am I asking the impossible again?
Rey Obrero (Capricorn1)

is the idea behind all this is to see the complete text in the textbox?
if that is the case, you can
> add a vertical scroll bar to the textbox
> use the double click event of the textbox to view the content in a zoombox
   private sub textboxtxtPath_dblClick(cancel as Integer)
    docmd.runCommand accmdzoombox
    end sub
Derek Brown

ASKER
Thank you all

I had considered using the scroll bars but the idea was to show all text in the box. The Zoom box is an excellent second choice and also Cap is correct the control will not grow on a form.

If my last post is not possible then I will have to leave it as is.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck