Displaying Multiple thumbnails and or images on a form

D

drwhogj

I'm working on an Inventory for clothing. Each garment has a text
description, which can be confusing. I would like to use pictures as well
text to define each garment. I came up with a form that shows one image at a
time, but I want to show all the clothing for each person at one time on a
form.
Newbie needs help!
 
B

bhammer

I did this with an image database a few years ago (Access97). Did it with
three rows of four. One photos was in the "highlight" position and the others
loaded using the rs.MoveNext method something like this: ("N" is for Next,
"P" is for Previous)

Private Sub Form_Current()
On Error GoTo Err_Form_Current

'Load current, highlight image
Me.imgPhoto.Picture = Me!FilePath & Me!FileName

'setup navigation recordset
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.Bookmark = Me.Bookmark
rs.MoveNext
If Not rs.EOF Then
'Load next image
Me.[ImgPhotoNext].Picture = rs!FilePath & rs!FileName
Me.txtNextFileName = rs!FileName
Else: Me.[ImgPhotoNext].Picture = "c:\windows\blank.bmp"
Me.[imgPhotoN2].Picture = "c:\windows\blank.bmp"
Me.[imgPhotoN3].Picture = "c:\windows\blank.bmp"
Me.[imgPhotoN4].Picture = "c:\windows\blank.bmp"
Me.[imgPhotoN5].Picture = "c:\windows\blank.bmp"
Me.[imgPhotoN6].Picture = "c:\windows\blank.bmp"
Me.[ImgPhotoP].Picture = "c:\windows\blank.bmp"
Me.[imgPhotoP2].Picture = "c:\windows\blank.bmp"
Me.[imgPhotoP3].Picture = "c:\windows\blank.bmp"
Me.[imgPhotoP4].Picture = "c:\windows\blank.bmp"
Me.[imgPhotoP5].Picture = "c:\windows\blank.bmp"
Me.txtNextFileName = ""
Me.txtNext2FileName = ""
Me.txtNext3FileName = ""
Me.txtNext4FileName = ""
Me.txtNext5FileName = ""
Me.txtNext6FileName = ""
Me.txtPrevFileName = ""
Me.txtPrev2FileName = ""
Me.txtPrev3FileName = ""
Me.txtPrev4FileName = ""
Me.txtPrev5FileName = ""
End If
rs.MoveNext
If Not rs.EOF Then
'Load 3rd image
Me.[imgPhotoN2].Picture = rs!FilePath & rs!FileName
Me.txtNext2FileName = rs!FileName

.. . . there's alot more, but you get the idea.
It was bulky and a bit slow because it had to load 12 photos of 800x600 each
(into the small image frame, of course), but if you actually have
thumbnail-sized jpgs in your folder then with the small filesizes it should
be better. I needed full-frame ability for my pics, so never bothered to
reduce filesizes. But it's do-able.
 
D

drwhogj

Code was good, but being a NEWBIE, I'm having a heck of time converting it to
work with my tables. It's times like this that I feel like an idiot. I have
a table where I have put the paths to the individual pictures. What I'm
trying to do is have the form come up and display possibly one large image
and then maybe a strip of thumbnails below it as a preview and then flip
through the rest.
Lou

TIA
 
B

bhammer

I would like to have a form like that, too.

Unfortunately, it's very complex to code it, and is slow when you do. The
best solution is to purchace an ActiveX control that does all that and more,
but those cost from hundreds to thousands of dollars, and so, don't make
sense for small enterprise work.

You can, however, learn much about displaying images in Access in this
forum. Just search Images, and you will find posts from Allen Browne, Steven
Lebans, and others who have done much in the images arena over the years.
Good Luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top