G
GingerF
I am trying to display a message when no loan number is entered on a Form.
There will be multiple people who will be using this form and the loan number
is my key field to pull information for reports. When I enter no loan
number I get the previous borrower displayed or if I'm starting with a blank
screen I get nothing and no message to the user to enter the loan number.
This is the code I am using when entering a loan number on the form. How can
I get "You must enter a valid loan number" to display when no loan number or
an invalid loan number is entered?
Private Sub Loan__Exit(Cancel As Integer)
Dim varBorrower As Variant
Dim varLoanNum As Variant
Dim strMsg As String
If IsNull(varLoanNum) Then
strMsg = "You Must Enter Valid Loan Number"
End If
varBorrower = DLookup("[Borrower]", "LoanNum Tbl", "[Loan Num] = [Loan#]")
If (Not IsNull(varBorrower)) Then Me![Borrower] = varBorrower
End Sub
Private Sub Loan__NotInList(NewData As String, Response As Integer)
Dim varLoanNum As Variant
Dim strMsg As String
If IsNull(varLoanNum) Then
strMsg = "You Must Enter Valid Loan Number"
End If
End Sub
There will be multiple people who will be using this form and the loan number
is my key field to pull information for reports. When I enter no loan
number I get the previous borrower displayed or if I'm starting with a blank
screen I get nothing and no message to the user to enter the loan number.
This is the code I am using when entering a loan number on the form. How can
I get "You must enter a valid loan number" to display when no loan number or
an invalid loan number is entered?
Private Sub Loan__Exit(Cancel As Integer)
Dim varBorrower As Variant
Dim varLoanNum As Variant
Dim strMsg As String
If IsNull(varLoanNum) Then
strMsg = "You Must Enter Valid Loan Number"
End If
varBorrower = DLookup("[Borrower]", "LoanNum Tbl", "[Loan Num] = [Loan#]")
If (Not IsNull(varBorrower)) Then Me![Borrower] = varBorrower
End Sub
Private Sub Loan__NotInList(NewData As String, Response As Integer)
Dim varLoanNum As Variant
Dim strMsg As String
If IsNull(varLoanNum) Then
strMsg = "You Must Enter Valid Loan Number"
End If
End Sub