Automatically fill in fields after first one is Selected.

U

UncleRon

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
 
D

David

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top