Lookup Description and Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In want to lookup a description and a related value and display them on a
form. I have been able to show both values in a combo box but i can only save
the description. What do i do?
 
Your table needs to look like this:
TblWhatever
WhateverID
Description
RelatedValue

You need a combobox based on this table. Set the following properties of the
combobox:
BoundColumn 1
Column Count 3
Column Widths 0;2;0

Add an unbound textbox named RelatedValue to your form.

Put the following code in the AfterUpdate event of the combobox:
Me!RelatedValue = Me!NameOfCombobox.Column(2)

When the combobox list drops down, you will see the list of descriptions.
When you make a selection, the selected description will appear in the
combobox and the corresponding RelaedValue will appear in the textbox.
 
Back
Top