I assume you have a table or query which contains:
Field 1: Code
Field 2: Description
Set an unbound combobox code field's (cboCodes) rowsource to this table/query. Then set these properties:
Column Count: 2
Column Widths: 2";0"
Bound Column: 2
The code will display in the combobox but the actual value of the field will be the description. Now create your description text box (txtDesc).
In the afterupdate property of the cboCodes, click the ... button, choose code builder, and type this between the Subs:
Code:
Me!txtDesc.Value = Me!cboCodes.Value
What this does is set the value of the textbox equal to the value of the combobox, which, remember is the actual description.
I hope I was correct in my assumptions. If not, please provide more detail.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.