Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-10-2019, 02:23 PM   #1
otto
Newly Registered User
 
Join Date: Aug 2019
Posts: 6
Thanks: 3
Thanked 1 Time in 1 Post
otto is on a distinguished road
"Auto Height" vs. "Can Grow" / "Can Shrink"

Hello everybody!


I can't grasp the difference between "Auto Height" and "Can Grow" / "Can Shrink" properties which are available for some sections in reports and forms like detail section. The MS help wasn't clear.


As I understand it, "Auto Height" is the same as the other two together. Is it really so?


AutoHeight:
https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2007/bb225494(v=office.12)?redirectedfrom=MSDN


CanGrow:
https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2007/bb225499(v=office.12)?redirectedfrom=MSDN


CanShrink:
https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2007/bb225500(v=office.12)?redirectedfrom=MSDN


Thanks for any clarification.


Otto



otto is offline   Reply With Quote
Old 09-10-2019, 02:55 PM   #2
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 4,683
Thanks: 50
Thanked 1,077 Times in 1,058 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: "Auto Height" vs. "Can Grow" / "Can Shrink"

Hi Otto. They could be doing the same thing, or at the very least, they are having the same effect. But the way I understand it, AutoHeight depends on the sizes of the controls in the section, and CanGrow depends on the data contained in the control.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
otto (09-11-2019)
Old 09-11-2019, 12:12 AM   #3
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,239
Thanks: 40
Thanked 3,646 Times in 3,516 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: "Auto Height" vs. "Can Grow" / "Can Shrink"

cangrow also only works when printing a form (or report) it has no effect on a form viewed onscreen

__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
The Following User Says Thank You to CJ_London For This Useful Post:
otto (09-11-2019)
Old 09-11-2019, 05:47 AM   #4
Minty
AWF VIP
 
Minty's Avatar
 
Join Date: Jul 2013
Location: UK - Wiltshire
Posts: 6,413
Thanks: 162
Thanked 1,732 Times in 1,702 Posts
Minty is a jewel in the rough Minty is a jewel in the rough Minty is a jewel in the rough
Re: "Auto Height" vs. "Can Grow" / "Can Shrink"

@CJ - Can grow does work on a report view and a report viewed IN a form. It's good way of varying the height of a memo type field within a form for viewing purposes.

But correct it doesn't work at all on a normal form.
__________________
If we have helped please add to our reputation - click the scales symbol on the left, tick 'I approve' and leave a comment.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Minty is offline   Reply With Quote
Old 09-11-2019, 06:15 AM   #5
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,239
Thanks: 40
Thanked 3,646 Times in 3,516 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: "Auto Height" vs. "Can Grow" / "Can Shrink"

my bad - should have said report view
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
Old 09-11-2019, 06:44 AM   #6
otto
Newly Registered User
 
Join Date: Aug 2019
Posts: 6
Thanks: 3
Thanked 1 Time in 1 Post
otto is on a distinguished road
Re: "Auto Height" vs. "Can Grow" / "Can Shrink"

Hello everyone,


Thank you all for your answers.


Okay now I understand it, at least theoretically. So I I've created a form with formheader visible to see it in action. The AutoHeight property for the formheader is set to Yes. At the bottom of the form I put a textfield (init height 300) who's height I set in VBA.


Code:
Private Sub cmdResizeField_Click()
Me.txtFieldToResize.Height = Me.txtFieldHeight.Value
End Sub
Now if I set the height of the textfield to say 1000, the formheaders height grows correctly. However if I set the height of the textfield back to say 100, the height of the formheader does not shrink as I would expect it.


Is this a bug or a feature or do I miss something?
otto is offline   Reply With Quote
Old 09-11-2019, 02:55 PM   #7
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,163
Thanks: 15
Thanked 1,575 Times in 1,497 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
Re: "Auto Height" vs. "Can Grow" / "Can Shrink"

The use of Auto Height is unclear at best. It seems to do what CanGrow does but clearly there is some subtle distinction. Maybe it is relevant when you print a form. Unless you have time to investigate, just stick with CanGrow and CanShrink since we know what they do.

__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
Old 09-11-2019, 03:13 PM   #8
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,239
Thanks: 40
Thanked 3,646 Times in 3,516 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: "Auto Height" vs. "Can Grow" / "Can Shrink"

if you want to adjust a section height (header/detail/footer) after reducing the height (or top) of the lowest control, just set its height to 0 - it will then default to the minimum height it can given the bottom of the lowest control. e.g.


(header) section height=2000
lowest control - top 1500, height 300

me.header.height=0

will change the header height to 1800

edit: the above is aircode

header is me.section(1)
footer is me.section(2)
detail is me.section(0)

__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Input " Like A* " in Validation Rule Property but it shows " ALike "A*" " AccessPractice Tables 2 06-24-2016 05:37 AM
If "TableA.FieldA" exists in "TableB.FieldB" then return "1" else "2" shdale Queries 8 10-29-2014 05:20 AM
Expr1: Format("012P","0000") Why I get "0001" amolin General 4 10-10-2012 08:33 PM
Query to Convert "Name" field to "Last Name" "First Name" "Middle Name"? derekbeck Queries 5 03-26-2012 03:23 PM




All times are GMT -8. The time now is 06:24 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World