J
Janet
I have a form with a textbox called "txtLoan Number". In the After Update
event for this textbox, I want it to look in a table and see if that loan
number already exists. The table I want it to look into is "Import Table"
and the field to look up in that table is "Account_Number". If the loan
number already exists in the table, I want a msg box to say so. I am
wondering why the following code does not work.
Private Sub txtLoan_Number_AfterUpdate()
If DLookup("[txtLoan Number]", "[Import Table]", "[Account_Number]=" &
[txtLoan Number]) Then
MsgBox "Already Exists"
Thank you for your help.
End If
event for this textbox, I want it to look in a table and see if that loan
number already exists. The table I want it to look into is "Import Table"
and the field to look up in that table is "Account_Number". If the loan
number already exists in the table, I want a msg box to say so. I am
wondering why the following code does not work.
Private Sub txtLoan_Number_AfterUpdate()
If DLookup("[txtLoan Number]", "[Import Table]", "[Account_Number]=" &
[txtLoan Number]) Then
MsgBox "Already Exists"
Thank you for your help.
End If