mercredi 1 juin 2016

How to add multiple checkboxes in multiple columns (VBA)

I have a ListView with multiple columns. More precisely, the ListView contains 8 columns. 2 of them should be filled with checkboxes.

Currently only the first column contains checkboxes. It is defined as follows:

While Not rs.EOF
   //first column with checkboxes
   ListViewCustomer.ListItems.Add , , rs("Id")
   ListViewCustomer.ListItems(ListViewCustomer.ListItems.Count).tag = rs("Status")
   //second column etc.     
   ListViewCustomer.ListItems(ListViewCustomer.ListItems.Count).ListSubItems.Add , , rs("name")
   ....
   //Here is the second column, which doesn't display the checkboxes
   ListViewCustomer.ListItems(ListViewCustomer.ListItems.Count).ListSubItems.Add , , IIf(IsNull(rs("date_from")), "", rs("date_from"))
   ListViewCustomer.ListItems(ListViewCustomer.ListItems.Count).tag = rs("Status2")
Wend

Do anyone have an idea how to add the checkboxes in the last column?




Aucun commentaire:

Enregistrer un commentaire