Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2002
    Location
    Kyiv, Ukraine
    Posts
    77

    Unanswered: Save JPEG in OLE Field?

    Any idea how can I save images (preferrably linked) in Access XP that are JPEG format? I've tried using OLE Field object but when I try to add there JPEG file there is only icon ".jpeg" appear and not actual image (even after marking show content, not icon in properties)

    Can you share your experience with saving JPEG images in Access DB?
    (simply putting file names in text field is far too easy and not interesting )
    Yours faithfully,
    Yaroslav Zaremba

  2. #2
    Join Date
    Mar 2002
    Posts
    192
    I just tried in on Office 2000 with a Jpeg and it works...

    The steps i did were to
    1. Create a table ( of course.. heh)
    2. Append an "OLE Object" Field to the database.
    3. Inserted a jpeg from file to a record on that table. Using Insert -> object from the menus
    4. Create a form. link form to that table.

    voila it showed.


    try this and if its still not working the problem lies elsewhere...

  3. #3
    Join Date
    Sep 2002
    Location
    Kyiv, Ukraine
    Posts
    77
    Originally posted by access_dude
    I just tried in on Office 2000 with a Jpeg and it works...

    The steps i did were to
    1. Create a table ( of course.. heh)
    2. Append an "OLE Object" Field to the database.
    3. Inserted a jpeg from file to a record on that table. Using Insert -> object from the menus
    4. Create a form. link form to that table.

    voila it showed.


    try this and if its still not working the problem lies elsewhere...
    Tried almost the same steps but Access still shows me only "icon" and not the content itself of the JPEG:

    1. Create Table, Append OLE Object field
    2. Insert JPEG file from menu: Insert > Object > From File
    2.1. Choosed the desired JPEG file, checked if the checkbox "Show like icon" was UNMARKED and hit OK.
    3. Pressed Autoform wizard - and again only icon is showed.
    Yours faithfully,
    Yaroslav Zaremba

  4. #4
    Join Date
    Sep 2002
    Location
    Ann Arbor, MI
    Posts
    47

    Re: Save JPEG in OLE Field?

    Originally posted by aZa
    Any idea how can I save images (preferrably linked) in Access XP that are JPEG format? I've tried using OLE Field object but when I try to add there JPEG file there is only icon ".jpeg" appear and not actual image (even after marking show content, not icon in properties)

    Can you share your experience with saving JPEG images in Access DB?
    (simply putting file names in text field is far too easy and not interesting )
    I have also had this issue: check to see if you have installed the JPEG Graphics Filter. It does not install by default. It would explain why you and Access_dude followed similar steps to different results.

    Also there is some great code here to help with pictures on forms and reports you might be into (as well as tons of other stuff):
    http://www.lebans.com/

    best regards ...

  5. #5
    Join Date
    Nov 2002
    Location
    San Antonio
    Posts
    20
    You need to convert the image to a BLOB (Binary Large Object) to save the actual picture in the OLE field. This can make the database very large if you have many pictures. Here is a link on how to do this:

    http://msdn.microsoft.com/library/de...tml/gs0102.asp

    Another option is to create a folder on your computer to store the pictures and only save the path to the pictures in the database. That way your database remains small and you can save the time and processing required to convert all of your pictures.

  6. #6
    Join Date
    Sep 2002
    Location
    Kyiv, Ukraine
    Posts
    77
    2munsworth: After some rethought I think the second variant will be the best. But how to do it? Say, I've created simple table with id field (counter) and path/filename text field. And I want to createa form with simple static "Image Box" but which will show current records image file in it? .... I've seen somewhere a VBA code how to do it, but can not find it now. Your help will be much appreciated.

    TIA.
    Yours faithfully,
    Yaroslav Zaremba

Posting Permissions

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