Re: Display stored JPGs on a form



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?



.



Relevant Pages

  • Re: Displaying a stored image on a form
    ... The Picture and FAX viewer is not an OLE server. ... I create a form with a Bound Object Frame control that has as its control ... JPG file type and change it from Internet Exploer to MS Office Picture ...
    (microsoft.public.access.forms)
  • Re: OLE Object- the real question
    ... Now you have a blank image control. ... Dim strFilename As String, strFind As String ... My file path for the 1st picture is ...
    (microsoft.public.access.forms)
  • Re: Using Image Acquisition Automation: how to display the thumbnail?
    ... I note that the Picture control in VB allows me to assign the image ... make sure it has been tested in VFP. ... >>access all of the items in the JPG file, including the thumbnail picture. ...
    (microsoft.public.fox.vfp.forms)
  • Re: Graphics in Report
    ... text1 on my report was a bound control named text1. ... I hope what you wrote actually translates to "change the picture ...
    (microsoft.public.access.reports)
  • RE: Adding Bound Pictures to an Access Database
    ... except in the case where I don't have a picture for a student. ... Dim strPath As String ... you have the Image control, not either of the Object controls. ... UI I'm not sure where you'll find it, but the Picture property should be ...
    (microsoft.public.access.modulesdaovba)