Solved

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

Posted on 2004-08-20
5
265 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
5 Comments
 
LVL 8

Expert Comment

by:arcross
Comment Utility
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
Comment Utility
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
Comment Utility
Can I do this?

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

Author Comment

by:indyng
Comment Utility
This way

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

Accepted Solution

by:
IndyBean earned 500 total points
Comment Utility
Hi indyng

Yes that is correct:

DoCmd.OpenReport stDocName, acPreview
DoCmd.RunCommand acCmdFitToWindow
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now