Results 1 to 14 of 14
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Shrink/Grow (2003)

    In a database I created some time ago, an occasion has occured where a text box is not big enough. Although set at 255, it's not big enough. I've changed this to memo. I've now got to change the control on the report to accomodate this change. I've set the Can grow property to 'Yes'. To make the report look right, I want the remaining controls to 'grow' with it. Can anyone tell me if I can achieve this.

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Shrink/Grow (2003)

    I'm not sure what you mean by "grow with it". When you set the "Allow to Grow" property for a control, you are saying that the height of the object will be adjusted to fit the text. This will not affect the height of any other controls. When this control gets bigger, however, it will "push down" on the form all controls that appear below the control being adjusted. So if you had, for example, 1/4" of space below a control before the next control, when the first control was made taller to fit the text, the system would still retain that 1/4" of space below the first control before starting 2nd control. Is this what you were asking?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Shrink/Grow (2003)

    Thanks Mark, I think it's the opposite of what you are saying. Say all the controls were 1/4". The first control had text entered into it making it 1/2". I would like all the other controls to expand to 1/2". This is just something I know our would ask for if I didn't try it.

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Shrink/Grow (2003)

    It doesn't work that way. And unless your controls had borders around them, how would you know anyway?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Shrink/Grow (2003)

    I thought as much. They do have borders. Thanks Mark.

  6. #6
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Shrink/Grow (2003)

    I'm not sure it will work, but you could try setting the height of these other controls to the height of that one control that can grow. Try it in your Detail Section's Format or Print events. Might work, depending on when Access adjusts the height of that control.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Shrink/Grow (2003)

    You should make the borders transparent, and use code such as that in <post:=145,479>post 145,479</post:>.

  8. #8
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Shrink/Grow (2003)

    Entered the code as in <post#=145479>post 145479</post#> and entered "BoxMe" in the tags, but only the boxes with more text grow. Am I missing something?

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Shrink/Grow (2003)

    I tested the code, it works, but
    a) You must set the Can Grow property of all the text boxes to Yes.
    [img]/forums/images/smilies/cool.gif[/img] You must set the Border Style property of the text boxes to No;
    c) You must set the Tag property of the text boxes to BoxMe;
    d) You must set the Can Grow property of the section that contains the text boxes to Yes.
    And, or course, you must create the On Print event procedure for the section that contains the text boxes.

    Check each of these carefully.
    Attached Images Attached Images
    • File Type: png x.png (8.7 KB, 0 views)

  10. #10
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Shrink/Grow (2003)

    Should I be drawing the lines in? None are appearing.

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Shrink/Grow (2003)

    Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

  12. #12
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Shrink/Grow (2003)

    Here it is Hans. When you run the report, just press enter, and ignore the criteria asked for. Thanks.
    Attached Files Attached Files

  13. #13
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Shrink/Grow (2003)

    You had set the Tag property of the text boxes to "BoxMe" (including the quotes) instead of to BoxMe (without quotes). If you correct that, the boxes will be drawn.

  14. #14
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Shrink/Grow (2003)

    Thanks Hans, that corrected it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •