Display value based on a combo box selection

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

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top