Microsoft KB Archive/294255

= ACC2000: Error Message When You Attempt to Display Images on a Form =

Article ID: 294255

Article Last Modified on 7/15/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q294255



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
When you attempt to display a form in Microsoft Access, you may receive one of the following error messages:

The expression  you entered as the event property setting produced the following error: Microsoft Access doesn't support the format of the file , so it can't load the picture.

- or -

Run-time error: 2114: Microsoft Access doesn't support the format of the file  so it can't load the picture.



CAUSE
This behavior occurs if either of the following conditions is true:
 * There is no registered Automation Server capable of handling the inserted image type. For example, Microsoft Internet Explorer is capable of rendering JPG images, but it cannot process them on behalf of other programs, and therefore it can not act as an Automation Server. -or-


 * There is no filter, or there is an issue with the specific filter used to display the image type.



RESOLUTION
To work around this issue, use one of the following methods:
 * Ensure that the graphic filters are installed and functioning correctly. To do so, test the filters with another program. -or-


 * Use another computer to convert the image to an alternate format such as Graphics Interchange Format (GIF). To do so, you can use a number of graphic editors -- for example, the Microsoft Photo Editor, which can be installed from your Microsoft Office 2000 CD-ROM.



Steps to Reproduce the Problem
 Remove all JPEG (.jpg) file associations. Rename Jpegim32.flt TO Jpegim32.old.

This file is usually located in the following folder:

C:\Program Files\Common Files\Microsoft Shared\Grphflt

 Start Access and create a new database TestImage.mdb.  Add the following table:   Table: tblImage Field Name: ImageID Data Type: Text Field Size: 2 Primary Key: Yes Indexed: Yes (No Duplicates)

Field Name: txtImageName Data Type: Text Field Size: 80   Open the tblImage table in Datasheet view, and then add the paths for one bitmap (.bmp) image and one .jpg image in the txtImageName field. The following example shows how the records might appear on a Microsoft Windows 98-based computer: <pre class="fixed_text">  ImageID   txtImageName --  1         C:\Windows\Circles.bmp 2        C:\Program Files\Common Files\Microsoft Shared\Stationery\Glacier Bkgrd.jpg </li>  Create the following new form based on the tblImage table: <pre class="fixed_text">  Form: frmImage --  RecordSource: tblImage

Image Control -  Name: ImageFrame Picture: &quot;C:\Windows\Circles.bmp&quot;

Text box ---  Name: txtImageName ControlSource: txtImageName Note that the Picture property of the Image control has been set to the path name for the first image. The Image control must have a valid Picture property in Design view. </li>  On the View menu, click Code, and then type or paste the following code: Function setImagePath Dim strImagePath As String strImagePath = Me.txtImageName Me.ImageFrame.Picture = strImagePath End Function </li> Set the OnCurrent and AfterUpdate events to =setImagePath.</li> Open the frmImage form in Form view and move to the next record. Note that you receive one of the error messages listed in the &quot;Symptoms&quot; section of this article.</li></ol>

<div class="references_section">