J
John
The following code is supposed to check if something was
entered in the Social Security textbox. If the box was
left empty, the user is supposed to get an error message
(this part works) when he attempts to go to the next
control and, after he clicks OK on the message box, the
focus should be set back on the Social Security textbox.
For some reason the Social Security box does not receive
the focus. Can you help?
Private Sub txtSSN_LostFocus()
txtSSN.SetFocus
If Len(txtSSN.Text) = 0 Then
MsgBox "You must enter the client's Social Security Number
(SSN)!", vbExclamation, "Insufficient Data"
txtSSN.SetFocus
End If
End Sub
entered in the Social Security textbox. If the box was
left empty, the user is supposed to get an error message
(this part works) when he attempts to go to the next
control and, after he clicks OK on the message box, the
focus should be set back on the Social Security textbox.
For some reason the Social Security box does not receive
the focus. Can you help?
Private Sub txtSSN_LostFocus()
txtSSN.SetFocus
If Len(txtSSN.Text) = 0 Then
MsgBox "You must enter the client's Social Security Number
(SSN)!", vbExclamation, "Insufficient Data"
txtSSN.SetFocus
End If
End Sub