Microsoft KB Archive/832508

= Images that are stored in OLE object fields do not appear correctly =

Article ID: 832508

Article Last Modified on 5/3/2005

-

APPLIES TO


 * Microsoft Office Access 2003

-



This article applies only to a Microsoft Access database (.mdb).

Novice: Requires knowledge of the user interface on single-user computers.



SYMPTOMS
When you store an image file in a table as an OLE object in Microsoft Office Access 2003, and then you try to display the stored image by embedding or by linking the image file in a form, a report, or a data access page, you may not be able to view the image. Additionally, you may notice that the file icon displays the file name instead of the image itself.



CAUSE
This problem occurs because Access 2003 cannot find the OLE Server that can correctly interpret the OLE object header information.



WORKAROUND
To work around this problem, use one of the following methods:

Install Microsoft Photo Editor
You can install Photo Editor from the Microsoft Office XP CD-ROM. To do this, follow these steps:  Insert the Office XP CD-ROM in your CD-ROM drive or in your DVD-ROM drive. If the Office XP Setup program does not start automatically, follow these steps:  Click Start, and then click Run. In the Run dialog box, type the following command in the Open box:

Click OK.  Follow the instructions in the Office XP Setup Wizard.

Make sure that you select the customized installation.</li> When you reach the Selecting Features step, set each node of the Setup tree to Not Available.</li> Under Features to install, expand Office Tools.</li> Click Microsoft Photo Editor, and then click Run from My Computer.</li> Click Install Now.</li> Click OK when the Office XP Setup program is completed successfully.</li></ol>

Display the images from a folder
Instead of storing the images inside the table as OLE objects, you can store the image file paths and the image names in the table and then display the images by using an image control. When you use an image control inside a form or a report, Access does not require the OLE Server to display the images in the image control. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

285820 How to display images from a folder in a form, a report, or a data access page

<div class="moreinformation_section">

MORE INFORMATION
When you install Microsoft Office 2003, the Setup program removes all the standard components from Office XP (such as Photo Editor) that you previously had installed on your computer. As a result, Access 2003 cannot find the OLE Server that can display an image file (such as a .jpg file or a .gif file), and you cannot view the embedded graphic files or the linked graphic files.

Steps to reproduce the behavior

 * 1) Start Access 2003.
 * 2) Open the Northwind.mdb sample database.
 * 3) In the Database window, click Tables under the Objects section.
 * 4) In the right pane, double-click Create table in Design view.
 * 5) Create a table that is named TestImage with the following details:

Table: TestImage

Field Name: FldImage

Data Type: OLE Object
 * 1) Open the TestImage table in datasheet view.
 * 2) In datasheet view, right-click the FldImage field, and then click Insert Object.
 * 3) Select Create from File, and then click Browse.
 * 4) Locate the .jpg image file. Select the .jpg image file, and then click OK.
 * 5) Click OK.
 * 6) On the File menu, click Close.
 * 7) In the Database window, click Forms under the Objects section.
 * 8) In the right pane, double-click Create form by using wizard.
 * 9) In Form Wizard, select Table: TestImage from the Table/Queries drop-down list.
 * 10) Click >> to move all fields from the Available Fields list to the Selected Fields list.
 * 11) Click Finish.
 * 12) If the form is not already open in form view, open the form in form view.

Notice that when you view the data in the table in datasheet view, the value of the OLE object is shown as a package image or as a bitmap image. Additionally, when you view the form that displays the OLE object in form view, the embedded image file does not appear. However, you can see the file icon for the image file that is embedded in the form.

<div class="references_section">