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

Combo box question 1

Status
Not open for further replies.

shar

Technical User
Apr 2, 2000
54
IR
In my form I use a combo box to pick a staff name from a list.&nbsp;&nbsp;The data source for the combo box, also has the staff phone number listed (2 columns in SQL, 'Name' & 'Phone').<br><br>Is there anyway to have the phone number entered in the 'phone' field when user picks a name from the combo box for the 'name' field?<br><br>Thanks.
 
Sure, use . . .<br><br>' for clarity<br>Const NameIndex = 0<br>Const PhoneIndex = 1<br><br>Private Sub Combo1_DblClick<br>&nbsp;&nbsp;&nbsp;Form![textfieldA] = Combo1.Column(PhoneIndex)<br>&nbsp;&nbsp;&nbsp;Form![textfieldB] = Combo1.Column(NameIndex)<br>End sub<br><br><br>Enjoy !<br> <p>Amiel<br><a href=mailto:amielzz@netscape.net>amielzz@netscape.net</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top