Use a Combo Box to Automatically Complete More than 1 Field?

  • Thread starter Thread starter JWeaver
  • Start date Start date
J

JWeaver

I have a Form that is completed with information like Name, Pay Rate, and
Employee Number. I have tried setting up a combo box to look up the Employee
# and then automatically complete the remaining fields pertaining to the
employee with the basic information. Is it possible to use a combo box to
automatically complete more than one field?

I appreciate any help that you can give me.
 
Hi John,

Since the other information you desire is stored in the Employees table,
you can simply echo it on your form using textboxes.

for instance:

Name --> EmpID

RowSource -->
SELECT EmpID
, Firstname & " " & Lastname as EmpName
, [Pay Rate]
, [Employee Number]
FROM Employees
ORDER BY Firstname, Lastname

columnCount --> 4
Columnwidths --> 0;1.5";1";1"
ListWidth --> 3.7" (sum of column widths + 0.2" for scrollbar)


then, in another textbox control -->
Name --> PayRate
ControlSource --> =EmpID.Column(2)

column indexes start with 0, so index 2 is really column 3

~~~

do not use NAME as a fieldname, it is a reserved word

Problem names and reserved words in Access, by Allen Browne
http://www.allenbrowne.com/AppIssueBadWord.html

anyway, you should store first name and last name in separate fields

~~~

for better understanding of the basics of Access, read this:
Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace



Warm Regards,
Crystal

*
(: have an awesome day :)
*
 

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

Back
Top