Hi Guys,
I am trying to display an image from the folder which correspond to my database record.
Here's the code:

I have only 3 records in the table but 4 image display instead of 3.
What should I do to display 3 images only by corresponding to recordCount with the column rs("img")?
Please help me guys!
Very much appreciated.
Thanks,
-kiad-
I am trying to display an image from the folder which correspond to my database record.
Here's the code:
Code:
Dim i
connection
rs.Open "select * from tbl_user", con, 3, 3
For i = 0 To rs.RecordCount
Image1(0).Picture = LoadPicture(App.Path + "\profile_pic\" & rs("img"))
If i Then
'New Image
Load Image1(i)
Image1(i).Visible = True
End If
'position start
Image1(i).Move (i Mod 13) * 1500, (i \ 13) * 2100
Next i
rs.Close: Set rs = Nothing
con.Close: Set con = Nothing

I have only 3 records in the table but 4 image display instead of 3.
What should I do to display 3 images only by corresponding to recordCount with the column rs("img")?
Please help me guys!
Very much appreciated.
Thanks,
-kiad-