JPG files in forms

  • Thread starter Thread starter Gordon Padwick
  • Start date Start date
G

Gordon Padwick

I've having trouble displaying JPG images in forms and reports
I'm trying to create a database that contains images from my Canon Digital
Rebel camera together with information about those images. I've downloaded
images from the camera as JPG files on my computer (Windows 2000).
When I try to bring the JPG images into access, all I see is a window that
shows the image file name.
Can anyone provide, or direct me to information about, how I can display JPG
images in Access 2000 forms and reports?

Gordon
 
You should leave the images on your hard drive and use the following routine
to get them:

Dim filename As String, pathname As String
Private Sub Form_Activate()
'find the path of the current database which is where the jpegs are
stored
pathname = CurrentProject.Path
End Sub

Private Sub Form_Current()
'set the picture path where ImageName is the name of the image control you
put on the 'form....
Me.ImageName.Picture = pathname & "\" & Me.txtNameof Image ' like
"mypic.jpg"
'have the image names in a table that is tied to the form. the control
source of 'txtNameofImage would be the field of the table with the
imagenames

'some error chkg....
End Sub
 
Thanks for the suggestion. Looks like Image Viewer would do the job. I'm
hoping for a solution that doesn't require me to purchase addition
software - Gordon
 
Your suggestion looks like the way to go. You didn't provide enough detail
to completely solve my problem. However, you pointed me in the right
direction. I found the article from Microsoft "How to display an image from
a folder in a form or in a report in Access 2000" (originally published in
the KnowledgeBase as Q210100). It supplied the added detail I needed.

Now, I can display pictures in my report.

The remaining problem is one of speed. I normally photograph images using
the camera's highest resolution. As a result, my JPG files are large -- 3 -
6 MB. These large files take a long time to load into the database. I don't
need such large files to provide the thumbnail images the report displays.
I'm looking for a way to automatically create reduced resolution JPG files
the database can use. In PhotoShop and various other graphics applications I
can open individual high-resolution JPG files and save each one at a
much-reduced resolution. That works okay, but it requires manual work on
each file.

Can anyone suggest a method I can use to automatically create a small-size,
low resolution version of each original JPG file?

Gordon
 
Back
Top