How to use autolookup

N

Newsgroups

I have three fields:
User ID, User name and user surname.

In a form I want the fields, user name and user surname to be filled in
using an autolookup, when the user id field is filled in (using a standard
lookup)
 
G

Guest

Either have a combo box with the 3 fields in as 3 columns and then the
control source of 2 text fields can be set to
=ComboBoxName.Column(1)
=ComboBoxName.Column(2)

or set the control source of the 2 text fields to

=DLookUp("UserName","UserTable","UserID = " & UserIDBox)
=DLookUp("UserSurname","UserTable","UserID = " & UserIDBox)

If UserID is text and not numeric then it should look like this

=DLookUp("UserName","UserTable","UserID = '" & UserIDBox & "'")
=DLookUp("UserSurname","UserTable","UserID = '" & UserIDBox & "'")
 

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

Similar Threads


Top