Bobadopolis
No I can't fix it dammit!
- Local time
- Today, 19:31
- Joined
- Oct 6, 2005
- Messages
- 77
Hi Everyone,
I have two fields - a 'checked' check box (that verifies if the records in the database have been checked against 'real' values) and a 'checked by' field where the checker should enter their name. I want to force the checker to enter their name if the records have been checked (and obviously leave both fields blank if they have not).
My code thus far is this:
Private Sub chkChecked_AfterUpdate()
If chkChecked = True Then
txtCheckedBy.SetFocus
End If
End Sub
'The 'Checked' check box
Private Sub txtCheckedBy_AfterUpdate()
If chkChecked = True And txtCheckedBy = "" Then 'have also tried this with IsNull
MsgBox "If the record has been checked then you must enter your name in the 'Checked By' field"
chkChecked.SetFocus
End If
End Sub
'The 'Checked by' field.
The first step works fine - the focus shifts when the box is checked, but the second stage doesn't work at all - there is no response. Any suggestions, what am I doing wrong?
Thanks,
Bobadopolis
I have two fields - a 'checked' check box (that verifies if the records in the database have been checked against 'real' values) and a 'checked by' field where the checker should enter their name. I want to force the checker to enter their name if the records have been checked (and obviously leave both fields blank if they have not).
My code thus far is this:
Private Sub chkChecked_AfterUpdate()
If chkChecked = True Then
txtCheckedBy.SetFocus
End If
End Sub
'The 'Checked' check box
Private Sub txtCheckedBy_AfterUpdate()
If chkChecked = True And txtCheckedBy = "" Then 'have also tried this with IsNull
MsgBox "If the record has been checked then you must enter your name in the 'Checked By' field"
chkChecked.SetFocus
End If
End Sub
'The 'Checked by' field.
The first step works fine - the focus shifts when the box is checked, but the second stage doesn't work at all - there is no response. Any suggestions, what am I doing wrong?
Thanks,
Bobadopolis