Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

What is the code to open a report and have it displayed as "fit" in a window?

Posted on 2004-08-20
5
Medium Priority
?
316 Views
Last Modified: 2012-06-27
Hi Experts,

I require a code that will open a report and make the report display as fit.

Thanks
0
Comment
Question by:indyng
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 8

Expert Comment

by:arcross
ID: 11851120
what do you mean display 'as fit'

This is to open the report in view mode
DoCmd.OpenReport "ReportName", acViewPreview

If what you mean it doesnt fit in th page you have to play with marging in the Page setup menu

Álvaro
0
 
LVL 18

Expert Comment

by:Data-Man
ID: 11851146
Put this code behind a button    

    DoCmd.OpenReport "rptReportName"
    DoCmd.Maximize
    DoCmd.RunCommand acCmdZoom75

There isn't a zoom fit, 75% is pretty close

Mike
0
 
LVL 1

Author Comment

by:indyng
ID: 11851330
Can I do this?

        DoCmd.OpenReport stDocName, acPreview
        DoCmd.RunCommand acCmdZoomFit
0
 
LVL 1

Author Comment

by:indyng
ID: 11851357
This way

        DoCmd.OpenReport stDocName, acPreview
        DoCmd.RunCommand acCmdFitToWindow
0
 
LVL 1

Accepted Solution

by:
IndyBean earned 2000 total points
ID: 11851372
Hi indyng

Yes that is correct:

DoCmd.OpenReport stDocName, acPreview
DoCmd.RunCommand acCmdFitToWindow
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question