Displaying a stored image on a form

D

Dave

I created an OLE Object type field in a table and then I inserted an graphic
file (JPG).

I then created a form on which I want to display my graphic file. I tried
to display the graphic in a bound object control but the contol only
displays the file name or an icon on the form. How can I get the actual
graphic to display?

I can display an image on a form but this is only a link to a graphic file
and if I move or delete the original graphic file the database connection is
lost. I want the image to be stored in the database so there is no linkage
to outside files.

Has anyone done this?

Thanks
Dave
 
A

Arvin Meyer [MVP]

You need a registered OLE server for the image type you are using. Try
reassociating Paint with bmp's gif's and jpg's.
 
D

Dave

Thanks Arvin

Currently JPG files are associated with Internet Explorer. When I double
click on the object control on the form, IE launches and the image is
displayed in the browser.

However, I want the image to display on the form itself (in the Access
object control).
 
S

Stephen Lebans

Here is a previous post of mine on this issue:

Newsgroups: microsoft.public.access.gettingstarted
From: "Stephen Lebans"
<[email protected]>
Date: Tue, 23 Nov 2004 20:18:36 -0400
Local: Tues, Nov 23 2004 8:18 pm
Subject: Re: Embedded bitmap images appear as "Package" instead of "Bitmap
Imag
Reply to author | Forward | Print | Individual message | Show original |
Report this message | Find messages by this author
You have installed software that has changed which program is registered
to display Bitmap images. Prior to your "break" when you double clicked
on the Image on the Access form which program was started up?

Whatever the original program was that served as the OLE Server to
insert the Bitmaps as OLE Objects in your table needs to be
reestablished in the registry as the registered program to display
Bitmap files.


Here is previous post of mine on this subject. Just follow the
directions.


Message 4 in thread
From: Stephen Lebans
([email protected])
Subject: Re: Inserting picture into an access form


View this article only
Newsgroups: microsoft.public.access.activexcontrol
Date: 2004-11-12 19:43:08 PST


In this case the OLE server is simply an Image/paint program that:
1) Can function as an OLE Image server
2) Is registered to handle the specific Image file types you want to
insert into the OLE obect field.


In most cases, MS Photo Editor is used as the OLE Server program. It
must though, be setup as the default/registered handler for the image
file types in question. MS Photo Editor is no longer included with
Office 2003. YOu will have to find you Office XP or WIn2K disks and
install MS Photo Editor only!


The simplest method to associate a program with a specific file
extension(BMP,JPG,etc.) is to:
1) Open a folder containing the Images you want to insert.
2) Right click on a file while holding down the SHift key.
3) From the popup menu select "Open With".
4) Scroll down the Open With Dialog window until you find MS Photo
Editor and select it.
5) Check the Always use this program to open this file type CheckBox
control.
6) Click OK.


Repeat the steps once for each different type of Image file you want to
embed in your table.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
A

Arvin Meyer [MVP]

Dave said:
Thanks Arvin

Currently JPG files are associated with Internet Explorer. When I double
click on the object control on the form, IE launches and the image is
displayed in the browser.

However, I want the image to display on the form itself (in the Access
object control).

That is your problem. IE is not an OLE Server. You must associate the image
files with a registered OLE Server. Try following Stephen Lebans
instructions.
 
D

Dave

I still cannot get the imapges to display in my form.

Here is a recap of my situation.

I have a table with an OLE Object data type field in which I insert a number
of JPG files by simply copying the file and pasting it into the table.

I create a form with a Bound Object Frame control that has as its control
source the OLE Object type field.

In Windows Explorer under Tools | Folder Options | File Types, I select the
JPG file type and change it from Internet Exploer to MS Office Picture
Manager or Windows Picture and Fax Viewer (MS Photo Editor does not appear as
an option for me).

After this all that appears on my form is the control with the image name,
no image itself. When I click on this control, Picture Manager launches and
displays the image just as Internet Explorer used to do before I registered
the JPG file type with Picture Manager.

But I want the image to display _in the form_.

I even tried creating an AutoForm referencing the image table as someone in
a different thread suggreested. This produces the same result as above, no
image, just a linked file name in the control.

What is it that I don't understand?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top