Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto fill in text box

Status
Not open for further replies.

Sugada

IS-IT--Management
Aug 1, 2001
33
US
Hello All.
I have a table called Team with stats on each team
member. For example ColorOfEyes, PurchasedFor, etc..
I have a form the pulls from the team table by Team Name,
using a combo box. So lets say I select "Chris Laszlo"
from my combo box.

I would like my form to show his eye color in a text box
and another text box for his Purchased price after just
selecting his name from my combo box. Can this done?

Sugada!
 
Afternoon Sugada!

With your data you want to create a query that extract the required fields from your table eg tblTeam. This qry eg qryTeam will be attached to your front-end form.
In the Criteria of your qry for the field ‘TeamName’ say, place a reference to the combo box on your form:

Eg: [Forms]![frmTeamMembersDetails]![cboTeamName]

Construct another small table with just a list of team names, eg tblTeamNames and in the ROW SOURCE of the Properties of your combo box, use either the Query Builder (or just type a query straight into the row source) to extract data from tblTeamNames.

Eg:
SELECT DISTINCTROW [tblTeamNames].[Names]
FROM [tblTeamNames]
ORDER BY [tblTeamNames].[Names]

(The ‘ORDER BY’ will sort the team names in ascending order as a drop-down list within your combo box).

On choosing an option from this list, the chosen name with pass from “..![cboTeamName]…” into your query. The qry will extract the relevant team records to be displayed within your frmTeamMemberDetails.


Best Wishes

Magnetar s-)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top