Solved

Can Grow

Posted on 2012-03-12
10
454 Views
Last Modified: 2012-03-15
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
0
Comment
Question by:DatabaseDek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 37709540
the "can grow" and "can shrink" property of the textbox controls only applies in a report not in a form...
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 37709556
my mistake, actually it does according to this page, but

http://msdn.microsoft.com/en-us/library/aa224005%28v=office.11%29.aspx

Notes

    The CanGrow property does not apply to a form or report page header and page footer sections, although it does apply to controls in such sections.
    This property affects 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.
0
 
LVL 15

Expert Comment

by:Ess Kay
ID: 37709557
you have to add some code to expand the control.

use the .height property
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37710070
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"
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37710117
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
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37710125
Ignore my post: 37710070.
capricorn1's post covers this...
0
 
LVL 15

Expert Comment

by:Ess Kay
ID: 37710176
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
0
 

Author Comment

by:DatabaseDek
ID: 37714335
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?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 37714392
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
0
 

Author Closing Comment

by:DatabaseDek
ID: 37724053
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.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question