Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrieve column values of the selected row of a multicolumn Access listbox

How can I retrieve the value of specified column of the selected row in a multicolumn listbox?

I populate the listbox by setting the RowSource property with a SQL string. BoundColumn set to value 1.

I can retrieve the value of the bound column (of the selected row) by using ListBox.Value. But I also want the value of another column.

like image 210
waanders Avatar asked Jan 10 '11 16:01

waanders


People also ask

How to get selected value in multicolumn ListBox?

You can use the ListBox1. ListIndex property of the listbox to return the selection index on the listbox change event. If you've populated the listbox from a range it will be easy to pick up the relevant cells from your list (remembering that the listbox index value starts at 0 for the first item).

What is a multicolumn listbox?

A multicolumn ListBox places items into as many columns as are needed to make vertical scrolling unnecessary. The user can use the keyboard to navigate to columns that are not currently visible.


1 Answers

Use listboxControl.Column(intColumn,intRow). Both Column and Row are zero-based.

like image 124
RolandTumble Avatar answered Sep 21 '22 02:09

RolandTumble