Accessing values in combo box

J

Jonathan Blitz

I have a combo box that displays values from an SQL Server table.

It displays data from a number of columns.
When a value is chosen it displays only the first value in the combo box.

Is there any way to access the other values in the same row or do I have to
perform another select from the database.
The other possibillity would be to display a concatenation of strings in the
combo - but that would be a bit ugly.

Any ideas.

--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
R

Ronald Dodge

You can use the "Column" property on the Combo-box/Listbox.

The "Column" property returns the data in String Data Type. It has the
following syntax:

object.Column(column,row)

object is the combo-box/listbox

column is the column number you want to retrieve, which the first column is
column number 0 while the nth column has the column number of n-1.

row is the row number you want to retrieve, which the first row is row
number 0 while the nth row has the row number of n-1.
 
J

John S

Jonathan,

Have you tried playing around with the column count property? Your query for
the row source should include the columns that you want to show.

FYI: Sometimes concatenation is the best solution: three or four columns of
differing widths can get real ugly.

John S

If this isn't the case, perhaps you have a problem with the database (out of
my league).
 

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