Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / February 2008

Tip: Looking for answers? Try searching our database.

Displaying a stored image on a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 29 Dec 2007 03:12 GMT
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
Arvin Meyer [MVP] - 29 Dec 2007 04:25 GMT
You need a registered OLE server for the image type you are using. Try
reassociating Paint with bmp's gif's and jpg's.
Signature

Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

>I created an OLE Object type field in a table and then I inserted an
>graphic file (JPG).
[quoted text clipped - 13 lines]
> Thanks
> Dave
Dave - 29 Dec 2007 06:42 GMT
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).

> You need a registered OLE server for the image type you are using. Try
> reassociating Paint with bmp's gif's and jpg's.
[quoted text clipped - 15 lines]
>> Thanks
>> Dave
Stephen Lebans - 29 Dec 2007 16:40 GMT
Here is a previous post of mine on this issue:

Newsgroups: microsoft.public.access.gettingstarted
From: "Stephen Lebans"
<ForEmailGotoMy.WebSite.-WWWdotlebansdot...@linvalid.com>
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
(ForEmailGotoMy.WebSite.-WWWdotlebansdot...@linvalid.com)
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.

Signature

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

> Thanks Arvin
>
[quoted text clipped - 24 lines]
>>> Thanks
>>> Dave
Arvin Meyer [MVP] - 29 Dec 2007 18:04 GMT
> Thanks Arvin
>
[quoted text clipped - 4 lines]
> 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.
Signature

Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Dave - 20 Jan 2008 22:45 GMT
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?
Arvin Meyer [MVP] - 04 Feb 2008 18:59 GMT
The Picture and FAX viewer is not an OLE server. Try using the sample file
on my website. You will then be using an image control, and not storing the
image itself. Instead, you only store the path to the image, thus saving
huge amounts of database bloat:

http://www.datastrat.com/Download/Picture2K.zip
Signature

Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

>I still cannot get the imapges to display in my form.
>
[quoted text clipped - 30 lines]
>
> What is it that I don't understand?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.