Automatically fill in fields after first one is Selected.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a master table with SSN, Last Name, First, Name and so. I
want to be able to have the other boxes in those fields automatically be
entered after punching in the SSN. How can I do this.

Thank you
 
I used a dlookup statement for this.
Private Sub SSN_LostFocus()
If Not IsNull(DLookup("SSN", "Your Tbl or Qry Name", "SSN='" &_
Me.SSN & "'")) Then
Me.Fname = (DLookup("fname", "Your Tbl or Qry Name", "SSN='" &_
Me.SSN & "'"))
Me.Lname = (DLookup("lname", "Your Tbl or Qry Name", "SSN='" &_
Me.SSN& "'"))

End If
End Sub

There is probally a better way, but htis worked for me.
 
Back
Top