Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jul 2001
    Location
    Oakland, California, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    possible to 'group' controls on a report? (A97 SR2)

    Is there any way to tell Access that certain controls on a report should be treated as if they were one thing? In the report I'm working on, I'd like certain text boxes and labels (about 60 of them) to have their Visible property set to "no" if the value of a particular field is zero. Is there a way to do this in one fell swoop, or do I need to loop through all the controls on the report and set each one individually?

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

    Re: possible to 'group' controls on a report? (A97 SR2)

    What you're describing is a control array, and Access doesn't have them. You can make it easier on yourself by naming the controls you want to "group" using a particular name like cgWhatever, where the "cg" represents your "control group". Then when you loop through the controls, you can test for that prefix on the name and set the control's properties based on that prefix.
    Charlotte

  3. #3
    New Lounger
    Join Date
    Jul 2001
    Location
    Oakland, California, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: possible to 'group' controls on a report? (A97 SR2)

    Thanks - that's the way I thought it might work out. If I had needed anything further to persuade me that naming conventions are a good thing, this would have done it. Since I'd named these all similarly, it was fairly straightforward to set it up with a For... Next loop, and adding or deleting one is simple.
    <img src=/S/joy.gif border=0 alt=joy width=23 height=23>

Posting Permissions

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