A form to look up a record

Y

yma

Hi All,

I have a unbound form with a few textboxes. The user can type an SSN in
Textbox0. Then the Textbox1 should display the person's name with that
SSN. The SSNs and names are stored in table1. How can I do this? I do not
want to use bounded textboxes since each user is given a few SSNs. The user
should not be able to see the other names if he does not have those SSNs.

Thank a lot.

Chris
 
A

Allen Browne

Set the Control Source of Textbox1 to:
=DLookup("PersonsNameField", "table1", "[SSN] = """ & [Textbox0] & """")
 

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