Multicolumn List box with check box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I want to display a list box with two columns. The first column should display the check boxes. And the second one will display the list of fields from one of the tables. The user selects the fields he/she wants to see in the query result by checking the boxes in the first column. Which control/ActiveX control should I use to get this kind of functionality

Thanks in advance

Shobha
 
Rather than using the checkboxes, set the listbox as simple or extended
multiselect. This will allow the user to select more than one item. You then
have to loop through the ItemsSelected property of the listbox to retrieve
the user's selections. Here is an example on how to do that.

Dim ctl As Control
Dim varItem As Variant
Set ctl = Me!lstNames
For Each varItem In ctl.ItemsSelected
Debug.Print ctl.ItemData(varItem)
Next varItem

--
Wayne Morgan
Microsoft Access MVP


Shobha said:
Hi,

I want to display a list box with two columns. The first column should
display the check boxes. And the second one will display the list of fields
from one of the tables. The user selects the fields he/she wants to see in
the query result by checking the boxes in the first column. Which
control/ActiveX control should I use to get this kind of functionality.
 
Back
Top