D
Dams76
I am creating a form with about 20 check boxes on it and one button.
Each checkbox will represent a query that needs to be run. So the user
will select multiple checkboxes and then press the execute button to
run the selected queries. I have my execute button set up with an On
Click evet. It calls a Macro and the Macro's action is RunCode.and
the function name is Click()
In Module 2 is the following code that is being called:
Public Function Click()
Call Module1.Command6_Click1
End Function
Here is the code in Module1
Public Sub Command6_Click1()
If CheckBox38 = Checked Then
MsgBox "Box checked."
Else
MsgBox ("Box NOT checked.")
End If
End Sub
The problem is everytime I click on the execute button it completely
ignores if the checkbox is checked or not. What I mean by this is
wether the checkbox is checked or not I always get the "Box NOT
checked" message box. I know this is probably just a simple error on
my part, but I am tearing my hair out trying to figure out the answer.
Thank you in advance for you help with this issue.
DavidS
Each checkbox will represent a query that needs to be run. So the user
will select multiple checkboxes and then press the execute button to
run the selected queries. I have my execute button set up with an On
Click evet. It calls a Macro and the Macro's action is RunCode.and
the function name is Click()
In Module 2 is the following code that is being called:
Public Function Click()
Call Module1.Command6_Click1
End Function
Here is the code in Module1
Public Sub Command6_Click1()
If CheckBox38 = Checked Then
MsgBox "Box checked."
Else
MsgBox ("Box NOT checked.")
End If
End Sub
The problem is everytime I click on the execute button it completely
ignores if the checkbox is checked or not. What I mean by this is
wether the checkbox is checked or not I always get the "Box NOT
checked" message box. I know this is probably just a simple error on
my part, but I am tearing my hair out trying to figure out the answer.
Thank you in advance for you help with this issue.
DavidS