C
Chris
In the following code I have 3 IF Statements. The first IF
sets the focus to the Client Field and works fine. The
second and third IF Statements move to the next field when
it should set the Focus back on itself. Any suggestions?
Private Sub Loan_Number_LostFocus()
If (IsNull([Client] = True)) Then
MsgBox ("You are required to input a Client number
first")
[Forms]![frmMain].[Client].SetFocus
End If
If ([Forms]![frmMain].[Client] = "708") Then
If Len([Loan_Number] <> 10) Then
MsgBox ("You must supply a 10 digit Loan Number for
708 Loan")
[Forms]![frmMain].[Loan_Number].SetFocus
End If
End If
If ([Forms]![frmMain].[Client] <> "708") Then
If Len([Loan_Number] <> 7) Then
MsgBox ("You must supply a 7 digit Loan Number for
this Client")
[Forms]![frmMain].[Loan_Number].SetFocus
End If
End If
End Sub
sets the focus to the Client Field and works fine. The
second and third IF Statements move to the next field when
it should set the Focus back on itself. Any suggestions?
Private Sub Loan_Number_LostFocus()
If (IsNull([Client] = True)) Then
MsgBox ("You are required to input a Client number
first")
[Forms]![frmMain].[Client].SetFocus
End If
If ([Forms]![frmMain].[Client] = "708") Then
If Len([Loan_Number] <> 10) Then
MsgBox ("You must supply a 10 digit Loan Number for
708 Loan")
[Forms]![frmMain].[Loan_Number].SetFocus
End If
End If
If ([Forms]![frmMain].[Client] <> "708") Then
If Len([Loan_Number] <> 7) Then
MsgBox ("You must supply a 7 digit Loan Number for
this Client")
[Forms]![frmMain].[Loan_Number].SetFocus
End If
End If
End Sub