BoundColumn property

G

gator

Can someone please explain in layman terms, the purpose of BoundColumn in
ComboBox in terms of viewing two columns when dropped down and storing one
value in the table and displaying different value in the form?

I want to be able to see two columns in drop down mode, column 1 value
stored in table and column 2 value displayed in form data view.
 
D

Douglas J. Steele

Since you want the value of the first column to be stored in the table, set
the BoundColumn to 1.

Since you want the value of the second column to be displayed, set the
ColumnWidths property to 0. (if you really wanted to, you could set it to,
say, 0;1" to ensure that the second column only shows as 1 inch wide)

Make sure the ColumnCount property is set to 2.
 
R

Rick Brandt

gator said:
Can someone please explain in layman terms, the purpose of BoundColumn in
ComboBox in terms of viewing two columns when dropped down and storing one
value in the table and displaying different value in the form?

I want to be able to see two columns in drop down mode, column 1 value
stored in table and column 2 value displayed in form data view.

The column value you see when the ComboBox is not dropped is always the
left-most column with a non-zero width. You can store any column you want
and that can even be a column that you do not show, but the first visible
column in the drop-down is always the column shown when not dropped down.
 

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

Top