TorrediPisa
Programmer
Good Morning
Say you have a Table like This:
EMPLOYEES
Name text 50 chars
Surname text 50 chars
Photo ole
I would like to use the listview to show a list of the employees as follows:
Photo Surname Name
I have coded as:
Dim db As Database
Dim rs As Recordset
Dim strSQL As String
Dim ItmX As ListItem
Set db = OpenDatabase("DATABASE.MDB")
strSQL = "SELECT * FROM EMPLOYEES
Set rs = db.OpenRecordset(strSQL,dbOpenForwardOnly)
Do Until rs.EOF
Set ItmX = ListView1.ListItems.Add(, , rs!PHOTO)
ItmX.SubItems(1) = rs!NAME
ItmX.SubItems(2) = rs!SURNAME
rs.MoveNext
Loop
I would like the photo appears in the list as an icon.
But of course id doesn't work.
Have you got an idea about?
Thanks for yr help.
Regards
TdP
Say you have a Table like This:
EMPLOYEES
Name text 50 chars
Surname text 50 chars
Photo ole
I would like to use the listview to show a list of the employees as follows:
Photo Surname Name
I have coded as:
Dim db As Database
Dim rs As Recordset
Dim strSQL As String
Dim ItmX As ListItem
Set db = OpenDatabase("DATABASE.MDB")
strSQL = "SELECT * FROM EMPLOYEES
Set rs = db.OpenRecordset(strSQL,dbOpenForwardOnly)
Do Until rs.EOF
Set ItmX = ListView1.ListItems.Add(, , rs!PHOTO)
ItmX.SubItems(1) = rs!NAME
ItmX.SubItems(2) = rs!SURNAME
rs.MoveNext
Loop
I would like the photo appears in the list as an icon.
But of course id doesn't work.
Have you got an idea about?
Thanks for yr help.
Regards
TdP