I get Run-time error '35602'. Can someone help I want to fill my listview with images but only one image then error on the second loop
Dim itmX As ListItem
Dim nlst As Long
Public Sub display()
Dim itmX As ListItem
Dim rs As DAO.Recordset
Dim db As DAO.database
Dim lstItem As ListItem
Dim strSQL As String
Set db = CurrentDb()
strSQL = "SELECT distinct employee FROM menu"
Set rs = db.OpenRecordset(strSQL)
rs.MoveFirst
nlst = 1
Do Until rs.EOF
Call ListView1.ListItems.Add(nlst, "open", Nz(rs!employee, "NA"), "open", "open")
nlst = nlst + 1
rs.MoveNext
Loop
'close recordset
rs.Close
End Sub
Dim itmX As ListItem
Dim nlst As Long
Public Sub display()
Dim itmX As ListItem
Dim rs As DAO.Recordset
Dim db As DAO.database
Dim lstItem As ListItem
Dim strSQL As String
Set db = CurrentDb()
strSQL = "SELECT distinct employee FROM menu"
Set rs = db.OpenRecordset(strSQL)
rs.MoveFirst
nlst = 1
Do Until rs.EOF
Call ListView1.ListItems.Add(nlst, "open", Nz(rs!employee, "NA"), "open", "open")
nlst = nlst + 1
rs.MoveNext
Loop
'close recordset
rs.Close
End Sub