Results 1 to 6 of 6
  1. #1
    Lounger
    Join Date
    Aug 2002
    Location
    Kansas City, Missouri, USA
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Insert .jpg in OLE field (Access 2003)

    I can insert a .bmp into an OLE field in a table and it will show in the OLE field on the form (based on this table) just fine. But, when I insert a .jpg into the OLE field it will not display in the OLE field on the form. Only the file name is displayed. I am not linking this .jpg and I am am using the "Create from File" option and browsing to the file name. What am I doing wrong?

    Thanks.

  2. #2
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert .jpg in OLE field (Access 2003)

    My experience is that JPGs are not supported for OLE. Given the relative size compared to BMPs, this is rather disappointing. HTH
    Gre

  3. #3
    Lounger
    Join Date
    Aug 2002
    Location
    Kansas City, Missouri, USA
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert .jpg in OLE field (Access 2003)

    As a workaround I have found that I can right-click the field, choose Insert Object, then select the Create New button and then choose an application like Adobe Photoshop. It brings up a new blank file within Photoshop. I can then open the appropriate .jpg file, copy and paste it into the new, blank file and then save the new file as a jpg and the picture then lives in the OLE field as a .jpg. -but- what a hassle!

    Thanks for the reply...I had a feeling .jpgs weren't supported correctly (even though the Access bible says to use .bmp, .gif, and .bmp). The .bmp seems to be the only format that works as expected. I had the same problem with .gif.

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Insert .jpg in OLE field (Access 2003)

    You should also be aware that if you are going to store very many images, you probably don't want to use an OLE object. They cause database bloat like crazy, as Access stores an uncompressed BMP version of the JPG file, so for typical photos for example, the database grows about 1MB for every photo. A better strategy in most cases is to store the images as files outside the database and store the file name and path in the database record. You can then use the image control to display photos or whatever and it works quite well. There are several fairly recent threads about this issue - see <post#=288121>post 288121</post#> which has a small attached database that demostrates the technique.
    Wendell

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

    Re: Insert .jpg in OLE field (Access 2003)

    See <post#=303079>post 303079</post#> about why it is not a good idea to store images in an Access table. <post#=296892>post 296892</post#> has a database attached that demonstrates the preferred way of handling images.

  6. #6
    Lounger
    Join Date
    Aug 2002
    Location
    Kansas City, Missouri, USA
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Insert .jpg in OLE field (Access 2003)

    Thanks to both of you. I checked out the threads and the database (those buttons on the form in the database for inserting pics are really slick!). When you spoke of "bloating", I checked the size of my database. It's just an experiment - has one table - one form - and only five records. Three records have .bmp pics, and the other two have my workaround .jpg pics. The size was 2.7mb. You're right - I'm going to find another avenue, rather than using an OLE field.

    Thanks for the responses.

Posting Permissions

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