Display images on form in Access 2010

Posted on 2011-05-06
Last Modified: 2012-05-11
I have a small access database and want to store/display simple small .bmp images on a form
I have created a table with an OLE field and used a form display the field

When I put an image into the field it always displays the icon - not the image

I have tried copy/paste the image and using Insert Object-> Create from file - making sure that display as icon is NOT selected (both of which methods used to work with my previous versions of access), but it always shows the icon - see screenshot

All the mages are simple, small bitmaps

How can I force Access to show the actual image ?
Question by:KCTS
    LVL 12

    Expert Comment

    Check below thread out of Microsoft, all you need te know about using Images in Access 2010;

    LVL 14

    Accepted Solution

    Hi KCTS,

    I would suggest you not add the images into your database but rather keep them as separate files and just display them when needed.  OLE fields make your DB large and unwieldly.  

    If interested here are the steps:
    1. Add a text field to hold the file location (i.e. txtPicFileLocation data: C:\Pictures\myimage.jpg)
    2. Add an unbound picture object to the form (i.e.  picObject1)
    3. In the OnCurrent event  then add one line of code
         me!picObject1.picture = me!txtPicFileLocation


    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    I'm with BillDenver

    Here is what I use
    LVL 70

    Author Comment

    Thanks for your replies - I was hoping to avoid linked images - the bitmaps in question are very small and not many of them.
    I appreciate that a lot of embeded bitmaps could make the database very large, but this would not be the case here - and it used to work with previous versions of Access.

    According to MS I should be able to embed a bitmap and view the image - is it a bug ?
    LVL 14

    Expert Comment

    by:Bill Ross

    Should not be an issue but the size of the image is not what causes the db growth in an OLE field.  Each field grows because the image viewer is also imported as part of each field.  Give it a try and you will see.  Add a single image and check the DB size.

    That said, when you display the image make sure the bound field is set to Stretch.


    LVL 70

    Author Comment

    I take your point about the image viewer - perhaps its the image viewer thats the issue.
    I have tried to embed the image but no matter what I do access refuses to show the image - it  just shows the icon.
    LVL 74

    Assisted Solution

    by:Jeffrey Coachman
    If the size of the file is not an issue, then why not use the linking method anyway?
    (In other words, you seem to be "against" the linking method)

    I mean, ...if your system is not working....

    This is a common issue here. Sometimes the fix is simple, sometimes convoluted.
    For this reason many Access developers do not use "Stored images".
    One exception is for simple logos on a form/report
    LVL 70

    Author Closing Comment

    The method I am trying to use is supposed to work! I wanted to avoid having the potential issue of copying the images when the file is moved. This does seem to be a bug in Access 2010 - googling reveals other users have had simialr issues.
    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    <I wanted to avoid having the potential issue of copying the images when the file is moved.>
    A simple script can update all the references to an image location.
    (as long as the individual files are not being dispersed to separate, disparate locations)

    <This does seem to be a bug in Access 2010 - googling reveals other users have had simialr issues.>
    Yes, in fact this has been an issue in Access since v2000 AFAICT.
    It issue is related, but not limited to:
    1. The "OLE" server (the app that is associated with the image type.)
    This association can be Hijacked by a recently installed program.
    2. The version of Office
    3. The default installed Office Image viewer
    4. Service Packs
    5. The type of control image is displayed in.
    Even Norton antivirus can effect this!:

    The other kicker with storing images in the DB is the inevitable request to get them back out...
    ...This has never been easy, or straightforward.

    Now in Access 2007-2010 there is a new "Attachment" datatype.
    It does *reduce* (not eliminate) Bloat, and it will display the image correctly and simply.
    (Just drop the fields on the form/report)
    So this may be a viable alternative in your situation.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
    No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
    Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now