Displaying OLE Object images in an Access database form

Posted on 2014-02-04
Last Modified: 2014-02-05
I've been wrangling with this for several days, and now I feel like I'm going in circles.

I have a table in a temporarily inherited Access 2007 database, which contains basic employee details and a PhotoField which stores a photo of each employee as an OLE Object.

As it currently stands the PhotoField is currently populated by 3rd party software used for making ID Badges for the employees.

Now I'm needing to have a bound form in the database, which displays the employee details including the photo.

Unfortunately it is not stored in the standard bitmap format that a bound object frame will happily display on a bound form with the rest of the information, so comes up blank. I've also been unable to get the object into an image control (successful only in linking an external file using the Picture property)

I have written a basic VB.Net application which is using a bound PictureBox control which  recognises and displays the images correctly, so I gather it is stored in an image format not too alien.

Before I go further, I need to say I realise the stupidity of storing these images as OLE Objects when they should be created as files separately and then linked to an image object in the form. That VB.Net application I built is able to export the OLE Objects as jpg's for that very reason.

However, the limited nature of the 3rd Party software which will only store and retrieve the pictures from OLE Objects in that table (for the sake of retrieving data to print the ID Badges), as well as certain politics limiting changing business processes and building a more flexible system, ties my hands somewhat. The common solution provided of exporting those images as files linked to the database aren't applicable unless it can be automated within the database itself (A third application designed for the sake of exporting those images regularly isn't really feasible, especially since when I'm done I will have to hand this back to an overseas office to manage for themselves).

What I guess would be ideal is something equivalent to the .Net PictureBox control that can be found within Access 2007, or added as an ActiveX control, so that it can display the OLE Object visually in an Access Form. Alternatively a means of using the image control to display a non-bitmap image stored within a database table.

Before you throw me a link to Stephen Leban's website, I've already looked through it without much success. I may have missed something on it, so I'm happy to review   relevant code/examples there that you can point me if you have specific details.

Question by:AngusT
LVL 15

Expert Comment

Comment Utility
As this is an OLE Object, you should user an OLE Object control on your application to show it (no bitmap). Also you will have the 3rd party software installed because OLE Object means an object of this kind of file.

If installing 3rd party on all computers that use your application is a problem, another option is to migrate all the ole objects to images.

Hope it helps.
LVL 19

Expert Comment

Comment Utility
Hello AngusT,

If you open the table in Datasheet View, what are the values you see under PhotoField? Is it Package or Bitmap Image?


LVL 84
Comment Utility
What image format is used for the picture (i.e. png, jpg, etc)? Office installs some (but not all) "graphic filters" by default, and if it's not a support image type it won't display. I believe only .bmp and .dib types are supported, unless you've installed other filters.

This is for 2003, but would be relevant for any version of Access:

Also see this regarding specifics on 2007/2010:
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

LVL 57

Accepted Solution

Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
Comment Utility
<<As it currently stands the PhotoField is currently populated by 3rd party software used for making ID Badges for the employees. >>

Really the problem is your 3rd party software.  It's probably doing something with the image to get around the old OLE bloat problem, which Access now can do on it's own.

 So as Scott said, the first thing is to understand what format the data is saved in, then either using a bound OLE control, or an image control.

 As an aside, you might want to look at:

 which is the control of choice for dealing with images in Access.


Author Comment

Comment Utility
In the datasheet it says 'Long Binary Data', so essentially stored as a BLOB.

The problem is that I don't know what format the data is, but is something recognised by the generic Picturebox Control in .NET applications, so it probably isn't something non-standard...but something that Access doesn't natively recognise. Unlikely to be a bitmap.

I've been through the documentation of the 3rd party software on the possible format of the image, but it gives no clue. It is really just a user and administration guide. I've emailed the customer support in the USA (we have no support contract) to find out, but as yet had no response.

If it is just making a blob from the image that is chosen then it is feasible that it is a jpg, since that is the source photo format. If I choose a bitmap to import, I might see how that works when I can (public holiday in New Zealand and so I can't remote in from Australia to check for another 24 hours).

Any idea if Access can identify a bitmap in a blob if it isn't explicitly told it is?

Thanks for the link. I'll take a look at the DBPix evaluation and might be able figure something out.

Author Comment

Comment Utility
Judging by the links above, it seems to confirm my suspicions that Long Binary Data isn't going to be recognised by any of the standard controls in Access as an image.

However, DBPix works perfectly! Used as a bound control, similar to PictureBox, which displays the PhotoField as an image it worked without a hitch.

Now the real work begins to convince someone to pay the $350 for the license (Aussie & NZ office fighting over who's cost centre it is going under, but thats not a technical problem. :)

Thanks everyone.

Author Closing Comment

Comment Utility
It isn't a solution in itself if you aren't able to, or aren't willing to, pay for the DBPix control, but it does solve the problem of one of the shortcomings of Access.

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

21 Experts available now in Live!

Get 1:1 Help Now