Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why Does Report Open with Zoom Set to "Fit" 1

Status
Not open for further replies.

RH610

Programmer
Aug 7, 2001
152
US
Why does a report open with zoom set to "Fit". It only does this on one PC.

Thanks
 
Check the resolution differences between the PC's. Sometimes a user sets there's different and the report or form takes up the whole page because of the resolution settings.

Let me know if this is it. Bob Scriver
 
Hi, Thanks for replying.

Resolution is the same on both PCs. On one the reports opens at 100% zoom; on the other it opens with the zoom at "fit". Would like it to be 100%.
 
In the code event procedure where you trigger the opening of the report use this:

DoCmd.OpenReport "rptYourReport", acViewPreview
DoCmd.Maximize

This will maximize the preview report window on all PC's. Bob Scriver
 
Add the following line to scriverb's code:

DoCmd.RunCmd acCmdZoom100

You can change the '100' to other zoom levels at well.

There is some issue regarding where this code has to run for it to work . . it works fine if it is run from a module, but may fail elsewhere.
- - - -

Bryan
 
Bry12345: That's a new one for me. Thanks. So, after we maximize the window we can zoom to whatever percent we want to just like the preview window's zoom combobox? Should that zoom command maybe be in the OnLoad of the report? Is that where it maybe doesn't work? Bob Scriver
 
Bob,

I believe it won't work in the OnLoad event . . I'm pretty sure that was the issue, but didn't post it before because I wasn't sure. In earlier codings, I would have put the 'maximize' in the OnLoad Event, so the 'Zoom' is probably why I'm running it from a module now.

I've got it running in a module and it works fine. - - - -

Bryan
 
I am having a similar problem in that a report we have used for a long time always opened at 100% but since converting to XP last week, it now opens to "fit" instead. This is an Access 2000 file opening in XP. I really don't want to go in and do a bunch of coding if I can avoid it. Does anyone know of a preference or option that may have been set that got "lost" in the upgrade?? Thanks.

Peggy
 
p7eggyc: I don't believe that that there is an option that can be set for this but the only line of code that needs to be added is the one indicated above.
DoCmd.OpenReport "rptYourReport", acViewPreview
DoCmd.Maximize
DoCmd.RunCmd acCmdZoom100

This will open the report for preview with its window maximized and its zoom set to 100%. Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top