Multiple OLE Objects in Report

GailFialho

Registered User.
Local time
Today, 16:16
Joined
Nov 20, 2001
Messages
34
My form is used to associate both images and files to a record. The subtable that contains this information only holds the record index as a foreign key (number), the image or file description (text), and path to the object (text). The form has both an image box and an unbound object frame. Which one is visible is determined by the file extension of the path. I use code to load the object into the correct control.
My problem is that this method works perfectly on the form but when I transfer it to the report, the OLE files won't load. I get an error message that the database cannot perform the action requested. I've placed the specifics into an attached text file.
Any help would be greatly appreciated.
 

Attachments

Thanks ElsVanMiert

The link you provided was very interesting and I'm strongly considering this 3rd party solution; however it does not answer the problem I'm having. The form and the report deal with both graphics and OLE files such as .doc, .xls., .ppt, etc. It's these OLE files that are giving me the problem. So far, all I've been able to do is load the file as OLE Linked in the form and then display it in the report. This works but is not the best solution as I'm sure you know. Even though I'm "linking" the file, the mdb is still caching a copy and bloating the database.
 
If you do not manage to make the report display the OLE's properly (it is certainly an ACCESS bug) you might consider to mis-use a form as a report and print it this way.
 
Thanks Again

Please don't loose patience with me. I certainly appreciate you taking the time to help me. However . . .
The form and the report are working. I can have my users browse the network and link to a file. This OLE Linked file is stored in the database as is normal for Access. using this information, the report prints out the file just as it is shown by the form.

What I'm looking for is a way to just store the path to the file and have it load when the report is formatting each detail page. This is very similar to the method used by the G!WA link that you sent me. The problem is that these types of files will not load into an Image box on a report, so I tried both OLE controls and neither of them works either.

Right now I am left with needing an OLE field in my table that stores a copy of the file and bloats my database.
 
i ve done it with no prob. the only con is that you are not able to use all kind of formats but bmp and jpg will work.
1. use a field to save the relative dir + the file (example: \images\picture.jpg)
2. add a label with this field in the report and set the its property to not visible
3. include a IMAGE in the report with the following properties already set:
a. type of image: linked
b. the Image should be blank or a blank file

4. use the ON format event of the Group header (i dont know the exact translation of this event):

Me![Image].Picture = Application.CurrentProject.Path & Me![PhotoPath]
In this case the image I included is [image] abd the label of the path plus the file name [photopaht]

hope it works
if not i will check it coz it works on ACC 97, 2000 and 2002
 

Users who are viewing this thread

Back
Top Bottom