Setting Property Values for Printing

F

fridjhon

My database has a table with a field called "Picture""
that contains a string which is the file path to the
actual picture I want printed in the report.
(I am trying to keep the database size small, so I am not
embedding the actual pictuert in the table field.)

In my report I have a Bound Object Frame whose Control
Source is the field Picture. The frame contains a small
icon. I am trying to write a procedure so that at the
time of printing, the Print Event sets the Picture
Property of the icon to the file path recorded in the
table.
I have written the following piece of code, but I am
obviously doing something wrong.

Private Sub PageHeaderSection_Print(Cancel As Integer,
PrintCount As Integer)
Dim Pic As String
Set Pic = CurrentDb.TableDefs
("Inventory").Fields("Picture").Value
IconPlaceHolder.Properties("Picture") = Pic
End Sub

Can you help?

Lionel
 
F

Fons Ponsioen

What I usually do is link an ole object and as such the
picture file name is the link to the actual picture file.
Fons
 
G

Guest

I tried that, but I still end up with a huge file (about
3-4 Gb) as the pics are all stored in the database.
Instead, I now have two fields, one with the filepath and
the second with the file name of the picture for that
record.
I want to write a procedure that will run when the On
Print event occurs, and concatenate these two fields into
the "Picture" property of a simple image that I have in
my report.
My question is: How do I define the two fields in the
table, and how do I define the Picture property of the
image. If I have this info, I can write the procedure
that will dump the filepath into the image control for
the printing of each record.

Can anyone help, as I know it is possible?

Lionel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top