It's actually simpler than this.
In the combo's Control Source, select the field of the form's recordset that you want it to update.
In the combo's Row Source Type, select Table/Query.
In the combo's Row Source, put a SQL query that selects the two columns ID and Description and orders them by the description. Example:
Code:
SELECT IDNM, Name FROM NameTable ORDER BY Name
If you already have a query object containing this statement, you can enter the query name instead.
In the combo's Bound Column, put 1 (representing the ID field). This identifies the ID column as the one that gets stored in the form's recordset.
In the combo's Column Widths property, put 0. This sets the width of the first column to 0, so it will be invisible, and also connects the text box part of the combo to the second column (the Description). Check out the help file topic on Column Widths to see how useful it can be.
Using the properties, there is no need to write any code for a combo box that updates a field in the form's recordset.
Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein