Unanswered: How to display thumbnail images on a form
Just wondering if it is possible to display thumbnail images on an access form?
I want to write a little program that stores all my pictures along with info title, date, etc. But I want to display all my images as thumbnails on a form. I have done this in VB6 using the image control and the listview control but are unsure how to use these controls in access. I have an imagelist and a listview obn my form which I got from the access toolbar > insert > Activex Control menu.
I'm almost probably that there was a previous discussion on this involving msofilepicker, search this site for image / picture and nwind
if you have that sample mdb from msaccess 'northwind.mdb' or 'nwind.mdb'
the 2003 version is much better, and does exactly what you need
it's in the employees form, you'll see the employee pictures displayed as thumbnails,
the nice thing about it is that it let's you store the image's path instead of as an OLE object which takes up space within the database.
play around with the code, it has sufficient comments around it so you should be able to find your way easily...
just make sure to set the image size property to stretch, so the image adjusts to the size that you set for it...
The employees form just shows 1 thumbnail per record at a time, to see the next picture you have to select the next record. What I want to do is to display all of the thumbnails on 1 form.
I have done this in VB6 using the image control and the listview control but are unsure how to use these controls in access. I have an imagelist and a listview obn my form which I got from the access toolbar > insert > Activex Control menu.
Forgive my ignorance but why can't you do this in exactly the same way you did in VB6?
Good Question, I used an image control and a listview in vb6. In access I have created a form then from the ActiveX tools I have added a microsoft listview, Imagelist control's, all looks ok... Cant find the correct code to make it work!. Somebody must have wanted to do exactly what I want to do?? surely??
you may use a control array for the image
... and maybe an unbound listbox, rowsource set for the filepaths...
for i = 0 to listcount -1
.top = this would depend on what type of spacing you want
perhaps insert an if then to check whether the image control's position
exceeds the boundaries of your form so you can increment on the top or
image(i).picture = lstBox.column(1)
assuming that you are storing filepaths to reference the images...
and you may also do some string manipulations on the file path, to extract the folder. so you can have one column for the file name and another column for the intermediate folder,
and isolate the common root as a fixed string that you can append when passing the path to the image.picture property