M
Ms937j
I am working on a form with two areas that allow an user to autofill in
textboxs, On the first text box when information is entered, the
corresponding textboxes will not autofill--automatically update with data.
However, the second set will. Please help.
First textbox area On Exit coding information:
Private Sub SSN1_Exit(Cancel As Integer)
Dim varFirst, varLast As Variant
varFirst = DLookup("Firstname", "Instructor", "SSN =[SSN1] ")
varLast = DLookup("Lastname", "Instructor", "SSN =[SSN1] ")
If (Not IsNull(varFirst)) Then Me![First] = varFirst
If (Not IsNull(varLast)) Then Me![Last] = varLast
End Sub
textboxs, On the first text box when information is entered, the
corresponding textboxes will not autofill--automatically update with data.
However, the second set will. Please help.
First textbox area On Exit coding information:
Private Sub SSN1_Exit(Cancel As Integer)
Dim varFirst, varLast As Variant
varFirst = DLookup("Firstname", "Instructor", "SSN =[SSN1] ")
varLast = DLookup("Lastname", "Instructor", "SSN =[SSN1] ")
If (Not IsNull(varFirst)) Then Me![First] = varFirst
If (Not IsNull(varLast)) Then Me![Last] = varLast
End Sub