Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can Grow

Posted on 2012-03-12
10
Medium Priority
?
486 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
  • 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 2000 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

927 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