Results 1 to 12 of 12
  1. #1
    Join Date
    Nov 2004
    Posts
    64

    Unanswered: How to display thumbnail images on a form

    Hi All,
    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.

    Can anyone help?

  2. #2
    Join Date
    Apr 2006
    Posts
    157
    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
    Only quitters quit!

  3. #3
    Join Date
    Nov 2004
    Posts
    64
    Hi There,
    Yeh I have the 2003 northwind.mdb but not sure where to look for a form that displays thumbnail imsges?

  4. #4
    Join Date
    Nov 2004
    Posts
    64
    Anyone had any ideas yet?

  5. #5
    Join Date
    Apr 2006
    Posts
    157
    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...
    Only quitters quit!

  6. #6
    Join Date
    Nov 2004
    Posts
    64
    Hi there,
    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.
    Ideas??

  7. #7
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    Use a continuous form.

  8. #8
    Join Date
    Nov 2004
    Posts
    64
    Yes, I could but I want to display all the images in a folder on 1 form. eg: I have 20 jpg images and i want to display them all in 1 form.

  9. #9
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by Franki
    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?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  10. #10
    Join Date
    Nov 2004
    Posts
    64
    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??

  11. #11
    Join Date
    Apr 2006
    Posts
    157
    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
    image(i).load
    .top = this would depend on what type of spacing you want
    .left
    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
    the left...
    image(i).picture = lstBox.column(1)

    assuming that you are storing filepaths to reference the images...
    Only quitters quit!

  12. #12
    Join Date
    Apr 2006
    Posts
    157
    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

    filestr = lstBox.column(1)
    folderstr = lstBox.column(2)
    image(i).picture = rootstr & folderstr & filestr

    i believe, i ran into some trouble with long filepaths a while back,
    Only quitters quit!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •