Group Visible or Invisible

J

Jason Stevens

I have about 30 text boxes and labels on a form and want to change their
visibility based on a check box. Rather than turning 30 text boxes visible
when you check the check box is there a way to make a group visible? I
tried using an option group but I couldn't figure out how to add text boxes
and labels to the option group.

Jason Stevens
RGS Associates
 
A

Allen Browne

There probably is a better design.

It sounds strange to have a group of 30 fields that you want to hide. Are
you sure this is a normalized design? Should some of them become a related
able with lots of records, instead of being lots of fields here? What does
the table analyzer say:
Tools | Analyze | Table

If there is some valid reason for doing this, you could name the boxes in a
sequence, e.g. Box1, Box2, ... Box30, and then code a loop:
For i = 1 to 30
Me("Box" & i).Visible = False
Next
 
J

Jason Stevens

Allen,
Thanks for the input. I think the for loop would work for me. It is a form
for entering foursomes for a golf tournament that we are organizing. It has
boxes for four players plus there email, address, & other contact info.
Thanks
Jason
 
A

Allen Browne

Okay, the loop sounds feasible.

Assuming that some of the people play golf more than once, a relational
design would create:
- a table of people (with names, and details)
- a table of groups (what date, kick-off time, ...)
- a GroupDetail table (the people in the group: 4 records if 4 people).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top