Article ID: 177908
Article Last Modified on 10/20/2003
C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb
Private Sub Form_Load()
Dim clmX As ColumnHeader, mydb As Database, myrs As Recordset
Dim itmX As ListItem
Set mydb = CurrentDb
Set myrs = mydb.OpenRecordset("Customers", dbOpenDynaset)
Set clmX = ListV.ColumnHeaders.Add(, , "Company", ListV.Width / 3)
Set clmX = ListV.ColumnHeaders.Add(, , "Address", ListV.Width / 3)
Set clmX = ListV.ColumnHeaders.Add(, , "Phone", ListV.Width / 3)
ListV.BorderStyle = ccFixedSingle
While Not myrs.EOF
Set itmX = ListV.ListItems.Add(, , CStr(myrs!CompanyName))
If Not IsNull(myrs!Address) Then
itmX.SubItems(1) = CStr(myrs!Address) ' Address field.
End If
If Not IsNull(myrs!Phone) Then
itmX.SubItems(2) = myrs!Phone ' Phone field.
End If
myrs.MoveNext
Wend
ListV.View = lvwReport
End Sub
Private Sub ListV_ColumnClick(ByVal ColumnHeader As Object)
ListV.SortKey = ColumnHeader.Index - 1
ListV.Sorted = True
End Sub
Private Sub ListV_ItemClick(ByVal Item As Object)
Select Case Item.Index
Case Is <= 15
Exit Sub
Case Is >= 15
' Toggle Ghosted property.
Item.Ghosted = Abs(Item.Ghosted) - 1
End Select
End Sub
129303 ADT/ODE: OLE Controls appear blank in Run-time Applications
Additional query words: doesn't appear nothing does not ole run time error 438 object doesn t support this property or method 2455 2683 can t
Keywords: kberrmsg kbbug KB177908