Changing a pictures source for a report

T

Terry

R.,

In the report section's "On Format" event. (the section
that contains the image control.)

Dim picky As String
picky = [fieldname with path]
[imagename].picture = picky

If you are printing lots and lots of records you will
eventually get errors (memory leaks or something). Using
bitmaps improves the performance but at around 7000
records mine still prangs.

HTH

Terry
-----Original Message-----
Hi All,

I'm trying to change the source of a picture/image with code for a report.

I'm trying to set the source of picture/image object if that is clear?

Currently [like the northwind database], the path to the
location of the picture is stored in the table in a field.
 
S

Stephen Lebans

If you move your code to the Print event you will have less chance of
generating the out of memory error.

If your original images are not in Bitmap format then you can convert
them at runtime. See:
http://www.lebans.com/image_faq.htm

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


Terry said:
R.,

In the report section's "On Format" event. (the section
that contains the image control.)

Dim picky As String
picky = [fieldname with path]
[imagename].picture = picky

If you are printing lots and lots of records you will
eventually get errors (memory leaks or something). Using
bitmaps improves the performance but at around 7000
records mine still prangs.

HTH

Terry
-----Original Message-----
Hi All,

I'm trying to change the source of a picture/image with code for a report.

I'm trying to set the source of picture/image object if that is clear?

Currently [like the northwind database], the path to the
location of the picture is stored in the table in a field.
How can i change the path of the object to the field value?

TIA
.
 
T

Terry

Thanks for that little gem Stephen.

Terry
-----Original Message-----
If you move your code to the Print event you will have less chance of
generating the out of memory error.

If your original images are not in Bitmap format then you can convert
them at runtime. See:
http://www.lebans.com/image_faq.htm

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


R.,

In the report section's "On Format" event. (the section
that contains the image control.)

Dim picky As String
picky = [fieldname with path]
[imagename].picture = picky

If you are printing lots and lots of records you will
eventually get errors (memory leaks or something). Using
bitmaps improves the performance but at around 7000
records mine still prangs.

HTH

Terry
-----Original Message-----
Hi All,

I'm trying to change the source of a picture/image with code for a report.

I'm trying to set the source of picture/image object
if
that is clear?
Currently [like the northwind database], the path to
the
location of the picture is stored in the table in a field.
How can i change the path of the object to the field value?

TIA
.

.
 

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