By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,704 Members | 1,944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,704 IT Pros & Developers. It's quick & easy.

Images

P: n/a
Hey,

I currently have images in records linked to my database which print
out on a report. Each of the images is a different size. What i would
like to be able to do is have the image control grow and shrink
depending on the size image, so more records can fit in the page. Is
there any way to do this?

Thanks for your help.

Christina

Jun 21 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
The standard Access Image Control maintains its designed size; if your image
is not the same size it allows you to select in the SizeMode Property to
display only part of your image (Clip), to fill the Image Control even if it
distorts the image (Stretch), or to display the image as large as possible
within the Image Control while maintaining the aspect ratio of height to
width (Zoom).

I must admit that I have never tried using "Can Grow" with an Image
Control -- I am not at all sure what that would do with an image from my
camera that defaults to 22" in its largest dimension. I have also never
found a reasonable need for "Clip" or "Stretch" mode.

Larry Linson
Microsoft Access MVP

<ch*******@hotmail.com> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.com...
Hey,

I currently have images in records linked to my database which print
out on a report. Each of the images is a different size. What i would
like to be able to do is have the image control grow and shrink
depending on the size image, so more records can fit in the page. Is
there any way to do this?

Thanks for your help.

Christina

Jun 21 '06 #2

P: n/a
Thanks Larry,

If i create another field, in the table with the images, which has the
dimensions of each image, is there any code i can write in the report
to change the size of the image control based on the dimensions of the
image?

I really apprieciate your help!!

Christina

Jun 21 '06 #3

P: n/a
<ch*******@hotmail.com> wrote
If i create another field, in the table with
the images, which has the dimensions of
each image, is there any code i can write
in the report to change the size of the
image control based on the dimensions
of the image?


The Controls do have a Height and Width Property, so you can try. I didn't
have much luck with some previous experimentation on sizing Controls and the
Section in which they resided, for different purposes. Your mileage may
vary.

Larry Linson
Microsoft Access MVP
Jun 21 '06 #4

P: n/a
Hey Larry,

I've put the following code into the 'On Format' event in the 'Detail'
section of the report.

imgPicture.Height = imgPicture.ImageHeight
imgPicture.width = imgPicture.ImageWidth

What happens is that it checks the dimensions of the first image and
uses that size control for all the images regardless of the size. Do
you have any suggestions on how to improve it?

Thanks,

Christina

Jun 22 '06 #5

P: n/a
<ch*******@hotmail.com> wrote
I've put the following code into the
'On Format' event in the 'Detail'
section of the report.

imgPicture.Height = imgPicture.ImageHeight
imgPicture.width = imgPicture.ImageWidth

What happens is that it checks the dimensions
of the first image and uses that size control
for all the images regardless of the size. Do
you have any suggestions on how to improve it?


For a quick test, I modified the experimental report that I had done to test
resetting the Detail Section height. It was based on the Northwind.MDB
Categories Table, which has imbedded OLE Object Pictures. I was able to
expand and contract the height of a Bound OLE Frame with the Pictures
inside. I made corresponding changes to the height of the Detail Section,
which worked, also.

I'd expect if changing height and width worked for a Bound OLE Frame, that
it would also work for an Image Control -- but what i expect doesn't always
prove true.

It is possible, perhaps, that the "ImageHeight" and "ImageWidth" properties
are affected by the Control's "Height" and "Width" properties, so may not be
a good choice for this purpose.

Just remember that Height and Width for Reports are in units of "twips", or
1/1,440th of an inch, so if you are storing picture height and width in
inches, multiply by 1440 before using to manipulate controls.

Larry Linson
Microsoft Access MVP
Jun 22 '06 #6

P: n/a
Thanks so much Larry!

I've finally got the image to work!!!! Now i can't get the report to
print a group of records on one page and force the next group onto
another page!!!!

I really appreciate all the help and perseverance.

Christina

Jun 23 '06 #7

P: n/a
<ch*******@hotmail.com> wrote
I've finally got the image to work!!!!
Congratulations!
Now i can't get the report to print a
group of records on one page and
force the next group onto
another page!!!!


That'll have to do with the group's KeepTogether and ForceNewPage
properties. Those can be tricky, so you'll have to experiment; if you are
lucky, what seems intuitive will work the first time. <G>

Larry Linson
Microsoft Access MVP
Jun 24 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.