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

前端 未结 3 1054
深忆病人
深忆病人 2020-12-15 19:11

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 st

相关标签:
3条回答
  • 2020-12-15 19:52

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

    0 讨论(0)
  • 2020-12-15 19:59

    For multicolumn listbox extract data from any column of selected row by

     listboxControl.List(listboxControl.ListIndex,col_num)
    

    where col_num is required column ( 0 for first column)

    0 讨论(0)
  • 2020-12-15 20:07

    Just a little addition. If you've only selected 1 row then the code below will select the value of a column (index of 4, but 5th column) for the selected row:

    me.lstIssues.Column(4)
    

    This saves having to use the ItemsSelected property.

    Kristian

    0 讨论(0)
提交回复
热议问题