Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JWeaver - 16 May 2008 18:59 GMT
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.
Signature

JWeaver

ruralguy - 16 May 2008 20:33 GMT
All that should go in the form's recordsource is the PrimaryKey of the
Employee's table.  If you join the two tables in a query on the Employee
Number then as soon as you supply that number the other fields will fill in.

>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
[quoted text clipped - 3 lines]
>
>I appreciate any help that you can give me.

Signature

RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

strive4peace - 16 May 2008 20:43 GMT
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 :)
 *

> 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
[quoted text clipped - 3 lines]
>
> I appreciate any help that you can give me.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.