Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box 2

Status
Not open for further replies.

jimsterS

Programmer
Apr 24, 2001
71
US
I have created a table with 5 rows. Each row contains an ID and A name. I create a form and add a combo box. Select the combo box and choose the builder. I select the return value to be the name. When I execute the form and select the combo box I get the list displayed okay but when I choose a row I always get the first column of the row I have selected. What must I do to get the second column to display. I can't have a simpler configuration.

I have changed the BoundColumn to 2.

Jim Shepard
 
Jim,


Some questions:

Do you want both the ID and Name fields displayed when the list drops down?

Do you want to store the ID or the Name (if any) in a table associated with the form? That is what the BoundColumn property relates to.

Have you tried changing the order of the fields? In the Builder, this would be on the 'List Items' tab. In the 'Selected Fields' column, put Name first, then ID.

Teresa
 
I have tried reversing the fields and that does work. But that means I would always have to have column 1. as the column to return the value. I thought I could pick any column.

Is there a way to select the second column as the value returned when the combo box is closed?
 
Hi Jim,

The value shown in the combobox will always be the 1st column. However, if you have BoundColumn = 2 the Value PROPERTY of the combobox will contain the value from column 2.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top