N
noname101 via AccessMonster.com
Ok I know that this should be pretty simple but I'm losing my head over this.
I've seen examples of people checking the value of a checkbox in more than
one way, sometimes like CheckBox = True, CheckBox.Value = True, CheckBox = -1.
Just as a test I have one checkbox created on my form called chkAssets. I
have a command button that when I click should have a message box show up and
say "True" if the box is checked and the value is true. When I click the
command button I get the message: Object variable or With block variable not
set. What am I doing wrong am I missing a reference or something?
Heres the code:
Private Sub Command17_Click()
If chkAssets.Value = True Then
MsgBox "True"
End If
End Sub
I've seen examples of people checking the value of a checkbox in more than
one way, sometimes like CheckBox = True, CheckBox.Value = True, CheckBox = -1.
Just as a test I have one checkbox created on my form called chkAssets. I
have a command button that when I click should have a message box show up and
say "True" if the box is checked and the value is true. When I click the
command button I get the message: Object variable or With block variable not
set. What am I doing wrong am I missing a reference or something?
Heres the code:
Private Sub Command17_Click()
If chkAssets.Value = True Then
MsgBox "True"
End If
End Sub