H
hermanko
Hi all,
I have a form based on a query that includes a Yes/No field as
checkboxes. I have a command button on the form footer that is default
at disabled when the form is opened (the checkboxes are all cleared as
well).
I need to enable the button once any checkbox is selected. The code I
have now only works partially. For example if i click any one checkbox,
the button enables fine. When i uncheck, it disables fine. The problem
occurs when I check several boxes, and as soon as I uncheck any one
box, the button will disable, even tho I still have other boxes
checked. Basically I need to fix my code so that when ANY one or more
checkbox is True i need the button to remain enabled. It doesn't sound
too hard to fix but i'm not strong with VB. My code is:
Private Sub Yes_No_AfterUpdate()
If Me![Yes/No] Then
Me!cmd_remove1.Enabled = True
Else
Me!cmd_remove1.Enabled = False
End If
End Sub
Any help would be great!
Herman
I have a form based on a query that includes a Yes/No field as
checkboxes. I have a command button on the form footer that is default
at disabled when the form is opened (the checkboxes are all cleared as
well).
I need to enable the button once any checkbox is selected. The code I
have now only works partially. For example if i click any one checkbox,
the button enables fine. When i uncheck, it disables fine. The problem
occurs when I check several boxes, and as soon as I uncheck any one
box, the button will disable, even tho I still have other boxes
checked. Basically I need to fix my code so that when ANY one or more
checkbox is True i need the button to remain enabled. It doesn't sound
too hard to fix but i'm not strong with VB. My code is:
Private Sub Yes_No_AfterUpdate()
If Me![Yes/No] Then
Me!cmd_remove1.Enabled = True
Else
Me!cmd_remove1.Enabled = False
End If
End Sub
Any help would be great!
Herman