Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / January 2006

Tip: Looking for answers? Try searching our database.

Report Size

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Don - 22 Jan 2006 14:58 GMT
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 - 22 Jan 2006 15:03 GMT
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").ZoomControl = 0
Don - 22 Jan 2006 17:06 GMT
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........

> ZoomControl is a hidden property of reports and forms.
> The value assigned is the per cent of "zoom" wanted.
[quoted text clipped - 7 lines]
> End With
> Reports("rptActualOrganizationandStaffing").ZoomControl = 0
Lyle Fairfield - 22 Jan 2006 17:38 GMT
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 - 23 Jan 2006 10:07 GMT
Lyle,
Unfortunately I don't understand any of what you are trying to tell me.
Don.............
> One would put this in a standard module.
> (Air code)
[quoted text clipped - 15 lines]
> Note, that a Sub cannot be called from a Macro, nor from a Menu
> Control.
Steve - 23 Jan 2006 16:56 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.