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!

Combo box problems, should be simple!

Status
Not open for further replies.

marct

Programmer
Apr 6, 1999
32
0
0
US
Hi,<br><br>I've got a combo box on a form where I am choosing &quot;Defect Categories&quot;.&nbsp;&nbsp;The combo box has two columns, one for the number of the category, the second for a description of the category.&nbsp;&nbsp;The combo box's record source is a table that has two fields in it - category number and category description.&nbsp;&nbsp;It's control source is the category number in a different table.&nbsp;&nbsp;I need to be able to select a category number/description combination from the combo box and, after a selection is made, display the category number in the combo box and fill a text box with the description of the category that was chosen.<br><br>I have gotten everything to work except filling the text box with the description of the category after a selection was made in the combo box.&nbsp;&nbsp;The text box represents a field in the same table that the combo box is selecting for (did that make any sense?).&nbsp;&nbsp;I thought at first that this would be easy, but it has proven otherwise for me.&nbsp;&nbsp;Does anyone have any ideas on this out there?<br><br>Thanks in advance for any help.&nbsp;&nbsp;I hope this description makes sense.<br><br>-Marc
 
Just posted an answer to this yesterday, here is a slightly modified version:<br><br>There are several ways, here's a sort of easy one:&nbsp;&nbsp;<br><br>1. Use your existing query. Leave the first column as is (CategoryNumber), change the second column to something like this (you have to key it in where the field name usually goes in the query grid):<br>Category: CategoryNumber & &quot; - &quot; & CategoryName<br>This would show up as something like:<br>003 - Wrong Color<br>2. Set the combo's ColumnCount property to 2, and the ColumnWidth to&nbsp;&nbsp;0,3<br>This hides the first (bound) column).You can modify that second number to whatever width you need to display.<br>Of course if you don't need to <i>see</i> CategoryNumber you could leave your query alone and just change the ColumnCount and ColumnWidthProperty as above.<br><br>If you use the search engine I think you'll find several other methods.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top