Controlling Scrollbars in reports.

  • Thread starter Thread starter Al Camp
  • Start date Start date
A

Al Camp

I have an unbound report with a simple Chart that occupies the top half of
my portrait report.

From my form, I click a custom menu button that calls a module Function that
opens the report in acViewPreview and acCmdZoom100. That works just fine.

However, the report is displayed slightly to the right, and slightly low.
I'd like to
display the chart "centered" on the screen.

How might I move get that chart to center on the screen?

Manually, I would use the scrollbars... can I control the scrollbars with
Code?

Thanks,
Al Camp
 
Al:

There's no real easy way to control the scroll bars of a report object.
The report object is sized when its previewed based upon the last saved size
you had in design mode. Of course you can move the report window on the
screen as size it using the move method, but centering the graph image
within the report is not really possible beyond that, so play with the
positioning of the graph on the report.
 
Steve,
I think I should have been more clear.
I'm not trying to move controls on the report during preview. I'm trying
to center the report on the screen after opening it in preview using the
acCmdZoom100.

When the report previews, the wysiwyg "page" itself is not centered on
the screen. Normally you would just use the vertical and horizontal scroll
bars to center the "preview" on the screen.

For example, If I opened the preview in acCmdFitToWindow instead of
acCmdZoom100, the preview would be "centered" by default, but... the Zoom100
opens the preview "registered" off center, in the upper left corner.
All I'm trying to do is... using VB... move those scroll bars
programatically so that the preview of the report comes up centered on the
screen.

I'm beginning to think that the scrollbars (and scrollbar position) are
not addressable by code, so I was looking for verification, one way or the
other, from other users.
Didn't understand this... could you explain how you would "move the
report" by using the "move method"?

Thanks for the help,
Al Camp
 
SA,
Regarding my other post...
Didn't understand this... could you explain how you would "move the
report" by using the "move method"?

Your comment got me searching for information about Move Method. I take
it that Access 97 didn't have it, because a help search came up with nothing
about it.

BUT... I found it in 2003. Just what I needed!
My question referred to a new app I'm doing in my newly installed 2003,
so this solution will work just fine. I need a little time to get up to
speed on 2003 features... I've been using 97 for years.
I just thought I could solve this problem with scrollbars... I had no
idea that Move Method existed.

Thanks, for the help!!
Al Camp
 
Sorry to post again, but I didn't have any luck with the MoveMethod as far
as moving the whole previewed report left or right, or up and down. (I used
the OnOpen event)

But, I did solve my problem...
I re-sized the page from 81/2 x 11 portrait, to 5 x 8 landscape, and open
the report with acCmdFitToWindow.
The preview (white area) fills the display, the chart fills that area, and
the whole thing is centered perfectly.

Whew! Nuf said about that!
Thanks,
Al Camp
 
Back
Top