Hi Steve, thanks for the suggestion. I will give it a try.
How does the code to cycle through the controls go?
Something like:
For each control on the form (how do you say that?) if the tag is equal to
"Hide These" then
Control.visible (how do you say that?) = false
Next
End if
Thanks for your help on this feature. Honestly, I didn't notice any
advertisement involved.
Richard
> You don't use a subform to do this.
>
[quoted text clipped - 26 lines]
>>
>> Richard
As Steve said
"Open your form in dsign view and select all the controls you want to hide.
Open properties, go to the Other tab and enter something such as HideThese
in the Tag property. Now you can write code to cycle through all the
controls on your form and for those with "HideThese" in the Tag property"
When you enter the "HideThese" in the Tag property, omit the quotation marks.
Now, in the following code, the Checkbox is called HideControls. You can use
this name, or replace it with a name of your choice. Place this code in the
code module for your form.
Private Sub Form_Current()
Dim ctrl As Control
If HideControls Then
For Each ctrl In Me.Controls
If ctrl.Tag = "HideThese" Then
ctrl.Visible = False
End If
Next
Else
For Each ctrl In Me.Controls
If ctrl.Tag = "HideThese" Then
ctrl.Visible = True
End If
Next
End If
End Sub
Private Sub HideControls_Click()
Dim ctrl As Control
If HideControls Then
For Each ctrl In Me.Controls
If ctrl.Tag = "HideThese" Then
ctrl.Visible = False
End If
Next
Else
For Each ctrl In Me.Controls
If ctrl.Tag = "HideThese" Then
ctrl.Visible = True
End If
Next
End If
End Sub
Good Luck!

Signature
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000
Richard Stricker - 24 Jun 2007 07:13 GMT
Hi, thanks for the exact help. I was able to both understand and use the
code you provided.
Your time and knowledge are appreciated!
Richard
> As Steve said
> "Open your form in dsign view and select all the controls you want to
[quoted text clipped - 47 lines]
>
> Good Luck!
DawnTreader - 30 Aug 2007 20:18 GMT
would this work with multiple groups for each control?
for example if i have 3 controls a, b, and c, that under certain
circumstances i needed all three to not be visible, then under different
circumstances i needed a and b to be visible and c not, and then a different
circumstance i needed b and c but not a... etc.
could i put in a tag "open, closed, submitted, processed" and then use code
to find then in a case select and hide and unhide accordingly?
> As Steve said
> "Open your form in dsign view and select all the controls you want to hide.
[quoted text clipped - 43 lines]
>
> Good Luck!
> Thanks for your help on this feature. Honestly, I didn't notice any
> advertisement involved.
>
> Richard
You are right Richard. I know that there is no advertising involved here.
Also Steve knows very well that we warned him about this several times ...
We warned him about hunting each and every post he would make. He ignores that.
It is sad it has to be this way. Steve just want's to be slammed in the face.
He has a very *bad* record in the groups here concerning his advertising.
We just want him to stop doing that.
The 'good' posts and the 'bad' posts are a pattern.
He believes he 'deserves' the right to advertise when he posts 'good' answers.
Look at the link I provided and you will understand.
He only needs to stop advertising and is very much allowed his 'good' posts.
Also his sigline is not the problem... he knows that very well.
He is just a stubborn a$$.
It is bad luck for him hat we are stubborn too...
ArnoR