Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hide a text box in a report (access 97)

    I need to hide a number of text boxes in a report depending on their values.

    How can i hide each text box and the label associated with it and allow the details section to reorganise accordingly ?
    ie. the text boxes are in a grid (5 high x 3 wide) and if any of them have a database value of "No" i do not want them displayed and the grid to 'shuffle about' (great db term though i have never found it in any book !) so that there are no gaps.

    any suggestions please ?

  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: Hide a text box in a report (access 97)

    You set a control's visible property in the Detail section's BeforeFormat event. As for "shuffling" the controls, you would have to do this entirely manually thru code. There is not, to my knowledge, a "shuffle" command.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide a text box in a report (access 97)

    The "can Shink" setting might handle some of your shuffling <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Peter

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hide a text box in a report (access 97)

    Labels don't have a can grow/can shrink property, so the labels would have to be removed from the detail section. I can't visualize the report described, and I can't see a good reason for all that "shuffling" anyhow. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

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

    Re: Hide a text box in a report (access 97)

    Well, the way it was described, I didn't think that the CanShrink property would help. Besides, I don't know of this has any effect if the control is just made not visible; I think it only works when there is no data in the control.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  6. #6
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide a text box in a report (access 97)

    Lables/Controlls set to invisible still allow the section to shrink, only useful though if you want to hide a compete row in the report. ( I use this to hide empty comment boxes in reports).

    HTH

    Peter

Posting Permissions

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