By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,549 Members | 1,717 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,549 IT Pros & Developers. It's quick & easy.

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

P: 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
Share this Question
Share on Google+
3 Replies


P: 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

P: 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
Expert Mod 15k+
P: 31,476
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.