Results 1 to 8 of 8
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Displaying jpg image (2002)

    I've got an OLE Object field called Photo and have inserted jpeg photos for these. However, on a form they only display the name of the file, as in image1.jpg. How can I tell Access to display the image on the form? Thanks, Andy.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Displaying jpg image (2002)

    It is not a good idea to store images in an OLE field. It will cause your database to grow tremendously in size, for Access stores an uncompressed bitmap of each image. The recommended approach is to store the path and filename of the image in a text field in the database, and to use a standard image control (not an unbound OLE control) and some VBA code to display the image. The database attached to <post#=296892>post 296892</post#> demonstrates how to do this in a form and in a report. The images can be .bmp, .jpg, .gif, .png, .wmf, .tif and several other graphics formats.

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Displaying jpg image (2002)

    I just need to show the images for demonstration purposes..

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Displaying jpg image (2002)

    I'd still use an image control instead of an OLE control.

  5. #5
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Displaying jpg image (2002)

    Yes.. but for demonstration purpose, is it not possible to simply display a jpeg directly on the form?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Displaying jpg image (2002)

    If it's for demonstration purposes, what is the objection against using an image control? You can use it to display a jpg picture.

  7. #7
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Displaying jpg image (2002)

    I've been away and am returning to this question.. Doesn't an image control display a single image, whereas I want a different image per record? I want to display (and store) ten images of properties as jpegs.
    Isn't there a Windows setting that will allow the display of jpegs dirrectly on a form? Or do they need to be converted to bitmaps?
    Thanks, Andy.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Displaying jpg image (2002)

    This is getting circular. The link I provided in <post:=573,760>post 573,760</post:> shows how to use an Image control to use a different image for each record.

    Access can display several types of images, including .jpg, but if you store them in the database itself, Access will store a .bmp version in addition to the original format. This causes a considerable increase of the size of the database.

Posting Permissions

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