Recommended Handling of Images

canadaboy

Registered User.
Local time
Today, 20:00
Joined
Sep 7, 2002
Messages
43
Does anyone have a recommended way to deal with images (ie. linked to file, OLE object embedded, others I'm not aware of)???

I have a report which summarizes the history of a project. In this report I have a subreport which has task information. As a user enters task information they have the option of associating pictures with the task (ie. prototypes, design images, test setup, etc).

So my data structure is based on:
- many projects
- each project can have many tasks
- each task can have many pictures

My report for each project lists some typical project information and a subreport shows the task details associated with that project along with as many images that are associated with it.

My current system links to files on a network to avoid database size. This works well for storage and form use, until I try to print or preview a report. Then some of my pictures don't show up and I get a message that says images may be too large. My report could conceivably have up to 100 images, but I'm images stop showing up when I have around 15-20 pictures. Pictures files are typically 300 KB.

Is there a better way to show images on a report?????
 
On the same disk as your MDB file resides, put the picture files in that folder or a sub-folder, or in a folder with an easily identifiable name. It should be a set-aside folder never used for any other purpose.

Always LINK your images. Never embed them.

At some low level, you PROBABLY should have a single record that ties back one picture to one task. Task//picture == one//many. The record should name the file. If you set aside the folder and always use the same file type, say .JPG, you can concatenate device, folder, and type to the name. (And therefore only need to store the name.)

If you want to see the pictures, have a child form that shows pictures for which the task is the parent. It should have an image control set aside for the actual picture. In the child form's OnCurrent event, load the name of the file to the image control's .Picture property. (Play with zoom, tile, and other controls. Myself, I dislike zoom and tile, but it ain't my project.)

Embellishments? You can search this forum for things like the Common Dialog conrol to see how you can pick a file. Put this option under a button on the child form to create a new record and pick a new picture. You can use the VBA FileCopy command to copy the file from its original place to your chosen folder for long-term storage. Once it has been copied, you can either just Kill the original (another VBA command) or put up a message box asking that the file be properly managed, moved, deleted, zipped, or whatever else floats your boat.

That bit about images being too large might be because of running low on physical memory. Look up Access specifications for reports to see if that topic addresses sizing issues.
 
Thanks a bunch for the time to reply in such detail with more hints than I asked for.

How do you look up Access specifications for reports?
 
. . .And how can 20 jpg images take up so much computer resources when I can take those same images and embed them in Microsoft Word or Excel and have it print beautifully?

I can do 100 images in Word and it takes a while but it is successful. It appears that Access dominates my Workstation PC more than the memory demands of engineering analysis (processor and memory intensive). . .Not such a great program if it can't handle 20 images. . .Sorry that's just my rant. . .

. . .I even tried OldSoftBoss's "ImageSample2000" database posted in Sample Databases portion of this forum. Just use his database to link to 20 to 30 images and watch the report fail. Same issue I'm running into.
 
. . .And how can 20 jpg images take up so much computer resources when I can take those same images and embed them in Microsoft Word or Excel and have it print beautifully?

Despite the claim that men sometimes make, ... size matters.

I'm not sure of the exact internal mechanism for picture management, but the images are open as (at least) linked objects.
 
http://www.lebans.com/printfailures.htm

This link appears to address the problem of not being able to print reports with links to pictures. There is a sample database to download along with some code.

I haven't tried it yet, but hopefully it can help me and others.
 

Users who are viewing this thread

Back
Top Bottom