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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate text box from record set based on value of another text box

Status
Not open for further replies.

Caryh

MIS
Apr 11, 2002
4
US
This is a helpdesk App that I'm working on. It is a VB6 front end with an access 2000 back end. I have a form that has several ADO controls on it along with several text boxes and combo boxes. One combo box drop down list is populated with technician names at form load by looping through a record set with the following code:

While cboAssignedTo.ListCount < datTechInfoRS.Recordset.RecordCount

cboAssignedTo.AddItem (datTechInfoRS.Recordset.Fields(&quot;Technician_Name&quot;))

datTechInfoRS.Recordset.MoveNext
Wend

The ADO control linked to table already populated with the info on the technicians(Name,Location,Email,ETC..). Based on the choice the user makes from the technician combo box, I would like to automagically populate another text box with that technicians email address from the same table. I not sure how to code it so that it looks at the cboAssignedTo.text value do a lookup for the record associated with that name and place the email address from the same record into the other text box. I hope I've giving enough info , thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top