Hi everyone, please help me with this error. Im trying to fix this for hours now but still im a failure. Thanks,
Public Sub LoadListView()
Dim strSQL As String
Dim objCurrLI As ListItem
Dim strZip As String
Dim strPhone As String
strSQL = "SELECT Accession" _
& " , DateReceived" _
& " , Author" _
& " , Title" _
& " , Edition" _
& " , Volume" _
& " , Copyright" _
& " , Publisher" _
& " , BorrowedBy" _
& " , BookCount" _
& " FROM BooksDatabase" _
& " ORDER BY Accession ASC"
mobjCmd.CommandText = strSQL
Set mobjRst = mobjCmd.Execute
lvwBooks.ListItems.Clear
With mobjRst
Do Until .EOF
Set objCurrLI = lvwBooks.ListItems.Add(, , " " & !Accession)
objCurrLI.SubItems(1) = !DateReceived & ""
objCurrLI.SubItems(2) = !Author & ""
objCurrLI.SubItems(3) = !Title & ""
objCurrLI.SubItems(4) = !Edition & ""
objCurrLI.SubItems(5) = !Volume & ""
objCurrLI.SubItems(6) = !Copyright & ""
objCurrLI.SubItems(7) = !Publisher & ""
objCurrLI.SubItems(8) = !BorrowedBy & ""
objCurrLI.SubItems(9) = !BookCount & ""
.MoveNext
Loop
End With
Set objCurrLI = Nothing
Set mobjRst = Nothing
End Sub