databasedonr
Registered User.
- Local time
- Today, 14:34
- Joined
- Feb 13, 2003
- Messages
- 163
I am trying to check the value on a check box that corresponds to another checkbox on the same form. Here is the code I am using:
With Me
.chkNewIndefinite.SetFocus
.chkNewIndefinite.TripleState = True
If .chkNewIndefinite = Null Then
.IndefiniteDisposal.SetFocus
If .IndefiniteDisposal = Checked Then
.chkNewIndefinite = Checked
ElseIf .IndefiniteDisposal = Unchecked Then
.chkNewIndefinite = Unchecked
End If
End If
And what I am trying to do is:
If the chkNewIndefinite checkbox is not checked, then check the value of the IndefiniteDisposal checkbox. Then, set the value of the chkNewIndefinite checkbox to be the same as the IndefiniteDisposal checkbox.
I want this to execute ONLY if the .chkNewIndefinite checkbox has not been checked - ergo, if it hasn't been changed by the user, make sure the value is the same as the other checkbox.
What happens when I execute this is -- nothing. As you can see, I have made sure I am using the triple state of the control, but when line 4 is read, it immediately ends, regardless of the value of the chkNewIndefinite checkbox!
??? Help, please!
With Me
.chkNewIndefinite.SetFocus
.chkNewIndefinite.TripleState = True
If .chkNewIndefinite = Null Then
.IndefiniteDisposal.SetFocus
If .IndefiniteDisposal = Checked Then
.chkNewIndefinite = Checked
ElseIf .IndefiniteDisposal = Unchecked Then
.chkNewIndefinite = Unchecked
End If
End If
And what I am trying to do is:
If the chkNewIndefinite checkbox is not checked, then check the value of the IndefiniteDisposal checkbox. Then, set the value of the chkNewIndefinite checkbox to be the same as the IndefiniteDisposal checkbox.
I want this to execute ONLY if the .chkNewIndefinite checkbox has not been checked - ergo, if it hasn't been changed by the user, make sure the value is the same as the other checkbox.
What happens when I execute this is -- nothing. As you can see, I have made sure I am using the triple state of the control, but when line 4 is read, it immediately ends, regardless of the value of the chkNewIndefinite checkbox!
??? Help, please!