Hi, trying to set up a unbound listview control in Access but running into a few problems and
can't get much info via Google. A lot of stuff my apply only to another platform (VB Net ?)
code
Code:
Private Sub Form_Load()
Dim thelistview As ListItem
Dim i As Integer
With ListView0
.ListItems.Clear
.ColumnHeaders.Clear
'.items.Clear() >>>> Error
.ColumnHeaders.Add , , , 300
.ColumnHeaders.Add , , "Field2", 1000
.ColumnHeaders.Add , , "s", 300
.ColumnHeaders.Add , , "Field3", 4500
.View = lvwReport
.GridLines = True
.FullRowSelect = True
.Checkboxes = True
'.SortOrder = lvwAscending
For i = 1 To 30
Set thelistview = .ListItems.Add
thelistview.SubItems(2) = "Test " & i
thelistview.SubItems(3) = "5"
thelistview.SubItems(4) = "3rd Column"
Next
End With
End Sub
Main problem is the .Clear instructions are failing, each time the Form opens the listview gets more columns.
The other things may be related to that, can anyone help me with that first? Thanks