Question posted 2011 · +9 upvotes
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.
Accepted answer +12 upvotes
Use listboxControl.Column(intColumn,intRow). Both Column and Row are zero-based.
Top access-vba Q&A (6)
- Create a query dynamically through code in MSAccess 2003 [VBA] +19 (2008)
- MS Access RunCode Macro cannot find my procedure +15 (2013)
- VBA: Why must I set focus to control every time? +15 (2013)
- Equivalent cURL in VBA? +14 (2013)
- Loop through all unbound controls on a form and clear data +11 (2013)
- Passing arguments to Access Forms created with 'New' +9 (2014)
access-vba solutions on this site
.