Programmatically Affecting Grouped Controls

G

Guest

Hello,

I am sure I am just missing something simple here, but my searches have
come up empty.

I am using Access 2002. I have grouped some controls on a form and have
set the visibility to false. I wish to make it so the group becomes visible
when I click a button. So far when I do it only one control appears. When I
set the group via the Format>>Group menu option I wasn't given a option to
name the group. Is there a way to programmatically reference the entire
group? Is there another route I should go? I thought about using the TAG
property of the controls to group items and reference them that way, but it
seems an object group would be easier and require less code.
 
A

Allen Browne

Dennis, I think Matty is asking about grouped controls, not controls in an
option group.

AFAIK, Microsoft has not provided a way to refer to the control group. There
is no Control Type for such a group. It is not a member of the Controls on
the form. You cannot get at the group as the Parent of the members of the
group. It does not appear to be a control array. So, I suspect this grouping
is a half-baked idea of limited use.

The tag property is okay. An alternative might be to name the controls in a
way that makes them easy to loop, e.g. txt1, txt2, ... so you can:
For i = 1 to 9
Me("txt" & i).Value = 99
Next
 
G

Guest

Dennis and Allen,

Thank you both for your responses. One of the controls I was using was a
frame object and indeed only it apeared when referenced. I will go with the
option to loop through the controls.

Thanks Again for the help.
 

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