Re: Display stored JPGs on a form
- From: "Dave" <davefrick@xxxxxxxxxxxxxxxx>
- Date: Tue, 22 Jan 2008 20:00:01 -0800
Thanks Bill
I understand that storing images in an Access database does not make for the
most efficient application but it is convenient. I stored over 200 JPGs
which bloated the size of the mdb file to 165 MB but that's okay with me.
The response time is fine and everything is self contained so I am happy.
My problem is trying to display my stored image on a form.
As I mentioned, I have a Bound Object Frame control on a form that has as
its control source the OLE Object type field in which the JPG is stored..
When I call up the form the image does not display, only a place marker. If
I click on the place marker the image will open in Internet Explorer or
whatever OLE server I have specified for JPGs.
Maybe this is the best Access can do?
However, if I remember correctly, one of the old sample apps that used the
Northwinds database stored employee pictures (image files) in the database
and got them to display on the form. I can't seem to find that old mdb file
though.
Is what I am trying to do possible?
"Bill" <billstanton@xxxxxxxx> wrote in message
news:n4-dncegRpqcFgjanZ2dnUVZ_gmdnZ2d@xxxxxxxxxxxxxxx
In all of what you've described, it isn't quite clear
exactly what you're trying to accomplish. But first,
I might suggest that you avoid storing images into
Access databases. Rather, establish an image
library, preferrably jpg images, and then link to
the image as driven by the database. You can do
this by creating an image control with its "Picture"
source left blank and then let the "Sections" OnFormat
Event set the link to the desired image.
Something like:
Me.MyImageControl.Picture = Me.[MyDBField]
Where: MyDBField is a fully qualified path to the desired
image. (Not the best idea to store fully qualified paths
as a database field, as it doesn't provide the flexibility
to move your image library around.)
Alternatively:
Dim strImagePath as String 'Of the form: "c:\MyAppl\"
Dim strImageLib as String 'Of the form: "MyImageLib\"
Me.MyImageControl.Picture = strImagePath & strImageLib & MyDBField &
".jpg"
Post back if this suggestion doesn't match what you're
trying to accomplish.
Bill
"Dave" <davefrick@xxxxxxxxxxxxxxxx> wrote in message
news:%23$bA4fKXIHA.484@xxxxxxxxxxxxxxxxxxxxxxx
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.
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 suggested. This produces the same result as above,
no image, just a linked file name in the control.
Has anyone else done this?
.
- Follow-Ups:
- Re: Display stored JPGs on a form
- From: "Peter Yang[MSFT]"
- Re: Display stored JPGs on a form
- References:
- Display stored JPGs on a form
- From: Dave
- Re: Display stored JPGs on a form
- From: Bill
- Display stored JPGs on a form
- Prev by Date: Re: Select Distiinct
- Next by Date: Re: Select Distiinct
- Previous by thread: Re: Display stored JPGs on a form
- Next by thread: Re: Display stored JPGs on a form
- Index(es):
Relevant Pages
|