A linked JPEG file is displayed as an icon on a form (258644)



The information in this article applies to:

  • Microsoft Access 97

This article was previously published under Q258644
Novice: Requires knowledge of the user interface on single-user computers.

SYMPTOMS

A JPEG file that you are linking is displayed as an icon when you view it in an OLE Object field on a form.

CAUSE

By default, the interpreter for the OLE Object field is Microsoft Paint. Paint uses .bmp files, and when you try to store or link a JPEG file, the file is stored as Package or Bitmap Image in the table. The OLE Object field then uses the default header information and associates Package or Bitmap Image with Paint. This results in the JPEG file being displayed as an icon on the form.

RESOLUTION

To resolve this problem, use one of the following methods:

Method 1: Use a different interpreter, such as Microsoft Photo Editor, to insert the object

  1. Open the Employees table in Datasheet view.
  2. Right-click the OLE Object field, and then click Insert Object.
  3. In the Insert Object box, click Create New.
  4. Under Object Type, click Microsoft Photo Editor 3.0 Photo, and then click OK. Microsoft Photo Editor opens.
  5. In Photo Editor, in the New dialog box, click Open an Existing Picture, and then browse to the JPEG file that you want to insert.
  6. Click the JPEG file. The picture opens in Photo Editor.
  7. On the File menu, click Exit and Return to tablename : Table.

    Note that the value, Microsoft Photo Editor 3.0 Photo, appears in the OLE Object field instead of Package or Bitmap Image.
When you insert a JPEG file at the form level, you must follow these same steps again if you are using an OLE Object field on the form. Remember to size the OLE Object field to the correct size for your JPEG file.

Method 2: Display the images from a folder

Instead of storing the images inside the table as OLE objects, 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 numbers to view the articles in the Microsoft Knowledge Base:

148463 How to display images in a form or in a report without storing the images in a table

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

210100 How to display an image from a folder in a form or in a report in Access 2000

MORE INFORMATION

Steps to reproduce the behavior

  1. Create a form that is bound to a table. Make sure the table has at least one OLE Object field.
  2. In Form view, right-click the OLE Object field, and then click Insert Object.
  3. In the Insert Object dialog box, click Create from File, and then click Browse to locate the JPEG (.jpg) file that you want to insert.
  4. Click the JPEG file, and then click Open.
  5. Click to clear the Display as Icon check box, and then click OK.

    Note The JPEG file is displayed as an icon instead of as its actual image. Also note that if you look at the OLE Object field at the table level, you see Package or Bitmap Image as the value in the table field.

Modification Type:MajorLast Reviewed:5/13/2005
Keywords:kbprb KB258644 kbAudDeveloper