ListView Checkbox problems...

rsmonkey

Registered User.
Local time
Yesterday, 20:40
Joined
Aug 14, 2006
Messages
298
Rite,

So i got a ListView box that is controlled by a combobox, so when the user selects a name the ListView populates with the check-boxes being the first column. I have set them so they are all checked (true) because this is what the user requires more often then not. However for those odd occasions I want to create a button the user can press and it will uncheck all the checkboxes!

sounds simple enough but its not! there is bugger all documentation on listviews and checkboxes contained within listviews. So if anyone could help me out I would be very grateful !

Cheers
 
hi adam,

attached is a print screen of my form.
 

Attachments

good morning rsmonkey....in my application i have something similar and i you this code:

Dim strSQL As String
DoCmd.RunCommand acCmdSaveRecord
strSQL = "Update [Itemdisplay] SET [Itemdisplay].[itemshow] = false"
strSQL = strSQL & " WHERE [Itemdisplay].[itemshow] = true" & ";"
Me.ItemShow.Requery

itemdisplay is the textbox where data displayed..and itemshow the checkbox

i hope it would helps
 
Last edited:
Hi, thx for you reply's etc but it really was simple in the end its just their is very little solid documentation on listviews however if anyone is interested this code will Check or Uncheck all Checkboxes.

Code:
Public Sub UnCheckAll_Click()

   Dim objListItem As ListItem

            For Each objListItem In Me.lvwMaterials.ListItems
            objListItem.Checked = False
            Next

End Sub

Public Sub CheckAll_Click()

   Dim objListItem As ListItem

            For Each objListItem In Me.lvwMaterials.ListItems
            objListItem.Checked = True
            Next

End Sub
 

Users who are viewing this thread

Back
Top Bottom