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

Report Size

P: n/a
Don
Is there a way to have my report open up in a size that is completely
viewable. For instance, I have a report that when it opens up (100%) I have
to scroll from side to side to see all the data. Is there a way to have
this report open up, say, 75% and is there a way to make it centered?
The only way I can do this now is to go to the "View" tab and choose 75%,
then adjust side to side to get it centered.
Can this be done automatically?
Thanks,
Don..........
Jan 22 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
ZoomControl is a hidden property of reports and forms.
The value assigned is the per cent of "zoom" wanted.
Zero maps to "size to fit".

example:

With DoCmd
.OpenReport "rptActualOrganizationandStaffing", acViewPreview
.Maximize
End With
Reports("rptActualOrganizationandStaffing").ZoomCo ntrol = 0

Jan 22 '06 #2

P: n/a
Don
I believe I understand what your saying but I don't understand how I write
this. If my report is called Monthly Report would it look like this?

DoCmd.OpenReport "Monthly Report", acViewPreview
DoCmd.Maximize

After this I'm totally lost.
Don........

"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
ZoomControl is a hidden property of reports and forms.
The value assigned is the per cent of "zoom" wanted.
Zero maps to "size to fit".

example:

With DoCmd
.OpenReport "rptActualOrganizationandStaffing", acViewPreview
.Maximize
End With
Reports("rptActualOrganizationandStaffing").ZoomCo ntrol = 0

Jan 22 '06 #3

P: n/a
One would put this in a standard module.
(Air code)

Public Function OpenMonthlyReport()

With DoCmd
.OpenReport "Monthly Report", acViewPreview
.Maximize
End With
Reports("Monthly Report").ZoomControl = 0

End Function

One would then "call" the Function. My preference would be from a
Custom Menu Bar Control. Alternatives would be from a Macro, or from a
Command Button, or in some other code.

Note, that a Sub cannot be called from a Macro, nor from a Menu
Control.

Jan 22 '06 #4

P: n/a
Don
Lyle,
Unfortunately I don't understand any of what you are trying to tell me.
Don.............
"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
One would put this in a standard module.
(Air code)

Public Function OpenMonthlyReport()

With DoCmd
.OpenReport "Monthly Report", acViewPreview
.Maximize
End With
Reports("Monthly Report").ZoomControl = 0

End Function

One would then "call" the Function. My preference would be from a
Custom Menu Bar Control. Alternatives would be from a Macro, or from a
Command Button, or in some other code.

Note, that a Sub cannot be called from a Macro, nor from a Menu
Control.

Jan 23 '06 #5

P: n/a
Don -

A 12-step program for using Lyle's code.
1. Create a new form.
2. Place a new button on your new form.
3. Right-click the button and choose 'Build event...'.
4. Choose 'Code Builder'.
5. Paste this between "Private Sub" and "End Sub" :
OpenMonthlyReport()
6. Place your cursor after "End Sub"
7. Paste Lyle's code.
8. Save (Ctrl + S).
9. Close the Visual Basic Environment window that you're in, using the
red X in the right-hand corner.
10. When you're back at your new form in Design view, hit F5 to run the
form.
11. Click the button.
12. View the report.

Jan 23 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.