469,917 Members | 1,474 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

Access '97 - Preview Report at "Fit" size rather than default "100%"

26
Greetings,

I have a report displayed on a screen that anyone in the office can look at. The data on this report will change from time to time. This report has different colors displayed depending on the data. Since I'm using Access '97, I can't do this on a form. What I am doing is "refreshing" this report every 60 seconds. Since Access '97 can't use the timer interval for reports, I have a form that is closing and then reopening my report using the form's timer interval. When the form opens, it opens at the default 100% size and not all data is visible. I want to change the default preview setting from "100%" to "fit". Is this possible? Does anyone know how to do it? I've hunted through the help files, settings, etc. and can't find anything to help me out...

Thanks!
Oct 4 '07 #1
3 2324
kjworm
26
I think that I can use DoMenuItem, but can't find the right method to call the "Zoom" procedure.

I have tried using:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.DoMenuItem acPrintPreview, acZoom ' just guessing here, the help files don't give a full list...
  2.  
And I have tried using the index:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.DoMenuItem 2, 6, 8
  2.  
Does anyone know where to find a list of Access menubars, menu names, and commands?

Thanks
Oct 4 '07 #2
kjworm
26
Please consider this one closed. I figured it out.

I put the RunCommand in the On Timer event procedure of the form I was using to open and close my report to refresh it.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Timer()
  2. Dim stDocName As String
  3. stDocName = "rptStatus"
  4.  
  5. DoCmd.Close acReport, stDocName
  6. DoCmd.OpenReport stDocName, acViewPreview
  7. DoCmd.RunCommand acCmdFitToWindow
  8.  
Oct 5 '07 #3
NeoPa
32,231 Expert Mod 16PB
Try using DoCmd.RunCommand().
From here use F1 for context sensitive help to show you a list of the available commands. Some near the bottom look as if they may be of use to you.
...
acCmdWorkgroupAdministrator
acCmdZoom10
acCmdZoom100
acCmdZoom1000
acCmdZoom150
acCmdZoom200
acCmdZoom25
acCmdZoom50
acCmdZoom500
acCmdZoom75
acCmdZoomBox
acCmdZoomSelection
Oct 5 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Leo Nunez | last post: by
4 posts views Thread by Daedric | last post: by
93 posts views Thread by jacob navia | last post: by
16 posts views Thread by Tantale | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.