Image Resizing(Stephen Lebans Code) and Centering

G

Guest

I have used Stephen Lebans code to Auto Resize images and would now like to
be able to center those images on a page regardless of their size. I am
dealing with thousands of images of all different sizes and resolutions so
centering a Bound Object Frame and stretching the image is not an option. Is
there anyway to do this?

Thanks,

Mike
 
S

Stephen Lebans

Do you simply want to:
1) Autosize the control to the Image currently being displayed.
2) Center the now resized OLE Frame control in the center of the Detail
section?

--

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

Guest

I would like to center the now resized OLE Frame contron in the center of the
Detail section? Can this be done? Thanks for all the help.
 
S

Stephen Lebans

Something like:
(Assumes name of OLE control is "OLE")

From the Format event of the Detail Section.

Me.OLE.Left = (Me.Section(acDetail).Width - Me.OLE.Width) /2
Me.OLE.Top = (Me.Section(acDetail).Height - Me.OLE.Height) /2


--

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

Guest

Stephen,

Your assistance has been greatly appreciated. I have one other problem that
I cannot figure out how to solve. In the report that I am using the
AutosizeOle code in when I "run" the report I first have to enter some
information for it to run a query off of. This seems to be causing a problem
with the report in that the code is NOT WORKING on the first page of the
report. On all the other pages the code works fine on. Any ideas?
 
S

Stephen Lebans

Sorry I have no idea what could be causing your issue.

--

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

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