Hi all-
I am using a listview (MSComctlLib.ListViewCtrl.2)on an Access form.
Actually there are six listviews on the form. I need to do the same
thing to all six forms so I have the loop below. I would like to assign
each control to a listview object, however I get a type mismatch.
Further investigation reveals that the type of the control is "Custom
Control" and not a listview. I would like to be able to work with real
control object's intellisense for one thing. Why isn't the object
recognized for what it is?
Further, where can I get good documentation on what the listview is
good for and its API. I looked on the MS site and found what i think is
old documentation. For instance, it talks about a DragMode property,
but I can only find an OLEDragMode.
dim lsv as object
'dim lsv as MSComctlLib.ListView 'doesn't work
For x = 1 To 6
Set lsv = Me.Controls("lst" & x)
'Turns out this is a custom form
MsgBox TypeName(Me.Controls("lst" & x))
lsv.LabelEdit = 1
lsv.View = 3 ' Set View property to 'Report'.
lsv.HoverSelection = False
' lsv.DragMode = 0
lsv.OLEDragMode = ccOLEDragManual
lsv.ListItems.Clear
next x
Thanks,
Elie