Display value based on a combo box selection

Z

zachnjoe

I have a combo box named "WPS Selector" which a user can select a [WPS] from
a table called [WPS Data]. Based on the [WPS] selected I would like the form
to display the value in column (2) of the table. Thxs
 
K

Ken Sheridan

Change the RowSource property of the combo box so that it returns both
columns, e.g.

SELECT [WPS], [YourSecondColumn]
FROM [WPS Data]
ORDER BY [WPS];

Set the ColumnCount property of the combo box to 2.

Add a text box to the form with a ControlSource property of:

=[WPS Selector].Column(1)

The Column property is zero-based, so Column(1) refers to the second column
of the RowSource query.

Ken Sheridan
Stafford, England
 
Top