Report Default Open Size

mrabrams2

Registered User.
Local time
Today, 15:06
Joined
Apr 29, 2003
Messages
54
All of my reports are opening in "FIT" view.

I cannot find the option to have the reports default to 100%.
(They do open Maximized, but not "100%)

Can anyone tell me where this setting is located?

I am using WINXP and Access 2003.

Thanks!
Michael
 
Hey Michael,

On the OnOpen event of the report try using the following code:

Code:
Private Sub Report_Open(Cancel As Integer)
DoCmd.RunCommand acCmdZoom100
End Sub

That should do it.

Rusty
:D
 
Thanks, but.

It still opens in "FIT" view.

I have only one line of code on the report - Docmd.Maximize

There has to be a setting where I can default this. I can't see writing code for every report to have them open Maximized and 100%.

Thanks Rusty. Hopefully this can be solved !

Michael
 
Michael,

If you're opening the report directly from the database window then the Zoom command isn't available. However if you're running it from a command button on a form then the code below should work.

DoCmd.OpenReport "ReportName"...
DoCmd.Maximize
DoCmd.RunCommand acCmdZoom100


Rusty
:D
 
Last edited:
Thanks again!

Thank you Rusty. I also learned that there is a report property in Access 2003 called AutoResize. Setting that to "YES" also does the job...............BUT:
What does one do with 100 converted databases, each with 10-20 reports in each ?!? I can loop through an individual database and set the AutoSize property, but that's still a lot of work !!

Microsoft - They try, but they just don't make it easy for us !!

Have a good weekend Rusty !

Michael
 
Setting zoom levels in reports

Rusty said:
Michael,

If you're opening the report directly from the database window then the Zoom command isn't available. However if you're running it from a command button on a form then the code below should work.

DoCmd.OpenReport "ReportName"...
DoCmd.Maximize
DoCmd.RunCommand acCmdZoom100


Rusty
:D

I've got a similar problem to Michael however my reports are opening up at 100% and I'd rather they opened up at "Fit". How can I get my reports to open up as "Zoom to Fit"? I've looked for acCmdZoomFit in the list but it's not there, although one would have thought it should be.

I've tried using the nearest standard zoom level, "acCmdZoom75" but don't like the output, which apart from not being quite right is not centered (which occurs when you manually click to Zoom to fit).

Solutions need to be suitable for Access '97.

Tim
 
Michael,

If you're opening the report directly from the database window then the Zoom command isn't available. However if you're running it from a command button on a form then the code below should work.

DoCmd.OpenReport "ReportName"...
DoCmd.Maximize
DoCmd.RunCommand acCmdZoom100


Rusty
:D

I am using Access 2003

This is an old thread on the topic I am trying to resolve. I have tried running this from a command button, but I still get the error "acCmdZoom100 not available right now" Any other suggestions?
 
I have tried running this from a command button, but I still get the error "acCmdZoom100 not available right now" Any other suggestions?
Hmm. Nothing definite but maybe a couple of thoughts will help you.

1. This isn't the only command that you've got in the button code?
2. Are all of the references that you require present? (Open VBA editor (ALT+F11) \Tools\References.)
3. Are you using Access 2003 on a Vista machine that also has Access 2007 installed? If so there are known issues: check out: http://support.microsoft.com/kb/936748/en-us

Other than that, perhaps someone else has had, and overcome, the same problem.

Season's greetings!

Tim
 
I did some more searching on Google, and found this - which DOES work.

DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.RunCommand acCmdZoom100

The key was using acViewPreview NOT Maximize (by the way a side effect was maximising everything - which I didn't want.

DoCmd.OpenReport "ReportName"...
DoCmd.Maximize
 

Users who are viewing this thread

Back
Top Bottom