Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frame and checkboxes

Status
Not open for further replies.

LongStar

Technical User
Jul 18, 2001
47
0
0
CA
Hi,

I want to add checkboxes on a frame but I don't want them to be exclusive (I want the multiple selection)... The reason I want to use a frame is for the ".Enable" property. If I disable a frame, everything in the frame is disable.

I don't want to manually disable each control in the frame...[wink]

Any idea ?

--------------------------------
LongStar
"If everything seems to be going
well, you obviously don't know what
the hell is going on !" (Murphy)
 
The help file says "Only one option in an option group can be selected at a time." So that's that!

You'll need to use a simpe Rectangle to 'group' your checkboxes. Then all you need to do is put some string of characters in the checkboxes' Tag property and you can run this code on the click of the button


Private Sub BtnToggleEnabled_Click()
Dim c As Control
For Each c In Me
If c.Tag = "grp1" Then
c.Enabled = Not c.Enabled
End If
Next c
End Sub

BTW, to easily add the text to the tag property for all the checkboxes select them all in design view and then type the sting into the tag property. All the seleted controls will then have a copy of the string in the Tag property.
 
I just submitted a post that I am wondering if the same type of solution may work. Thread702-659452

I'm new to this forum and not sure how to contact LambertH directly to see. I am also new to programming Access and am not sure if the solution provided here may work in my own application.

thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top