Multicolumn List box with check box

S

Shobha

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
 
W

Wayne Morgan

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.
 

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

Top