Connecting Tech Pros Worldwide Forums | Help | Site Map

Report Size

Don
Guest
 
Posts: n/a
#1: Jan 22 '06
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..........


Lyle Fairfield
Guest
 
Posts: n/a
#2: Jan 22 '06

re: Report Size


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

Don
Guest
 
Posts: n/a
#3: Jan 22 '06

re: Report Size


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" <lylefairfield@aim.com> wrote in message
news:1137942220.785992.31660@o13g2000cwo.googlegro ups.com...[color=blue]
> 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
>[/color]


Lyle Fairfield
Guest
 
Posts: n/a
#4: Jan 22 '06

re: Report Size


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.

Don
Guest
 
Posts: n/a
#5: Jan 23 '06

re: Report Size


Lyle,
Unfortunately I don't understand any of what you are trying to tell me.
Don.............
"Lyle Fairfield" <lylefairfield@aim.com> wrote in message
news:1137951528.683526.31320@g49g2000cwa.googlegro ups.com...[color=blue]
> 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.
>[/color]


Steve
Guest
 
Posts: n/a
#6: Jan 23 '06

re: Report Size


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.

Closed Thread


Similar Microsoft Access / VBA bytes