problem with mulit-column value list combo box

  • Thread starter Thread starter David G.
  • Start date Start date
D

David G.

I am trying to read the values of 2 columns of the selected item in a
multi-column combo box.

cboField1 is the multi-column combo box

cboField1.rowsource=r1c1;r1c2;r2c1;r2c2;r3c1;r3c2.....
cboField1 Row Source Type=Value List
cboField1 Column Count=2

Me("cboField1").ItemData(2)
gives me the value for column #1 in row #2

Me("cboField1").Column(1)
gives me the value for column #2 in row #1

I can't find the syntax for getting the value for column #2 in row #2.

Thanks for any help!
THANKS!
David G.
 
On Tue, 24 Nov 2009 21:38:31 -0500, David G. <[email protected]>
wrote:

Split(Me.cboField1.rowsource,";")(3)

Typically Access applications are only interested in the column values
of the selected row, which you can get via .Column(x).

-Tom.
Microsoft Access MVP
 
From Access 97 Help File

You can use the Column property to refer to a specific column, or column and
row combination, in a multiple-column combo box or list box. Use 0 to refer to
the first column, 1 to refer to the second column, and so on. Use 0 to refer
to the first row, 1 to refer to the second row, and so on. For example, in a
list box containing a column of customer IDs and a column of customer names,
you could refer to the customer name in the second column and fifth row as:

Forms!Contacts!Customers.Column(1, 4)


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

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

Similar Threads

Combo Box QUESTION 5
Combo Box Problem 23
Combo box 4
On click event procedure with a combo box 2
Access 2003 Combo Box 4
How do I add a COLUMN to combo box 2
Yes/No combo box 5
Combo Box 3

Back
Top