Report Must be Clicked to Enlarged

G

Guest

I developed an application which runs several reports. When a report opened
it remained minimized so I put a command in the open event of each report:

DoCmd.Maximize

This solved one problem, however, the report still does not fill the entire
screen until the report is clicked after it is displayed. Is there a way to
do this programatically so that when a report is opened, it not only
maximizes, but fills the entire screen without the user having to click on it
?
 
G

Guest

Place the following command after the docmd.maximize

DoCmd.RunCommand acCmdZoom100

Where you can choose the appropiate zoom factor you like (100, 150 etc.)

Maurice
 
F

fredg

I developed an application which runs several reports. When a report opened
it remained minimized so I put a command in the open event of each report:

DoCmd.Maximize

This solved one problem, however, the report still does not fill the entire
screen until the report is clicked after it is displayed. Is there a way to
do this programatically so that when a report is opened, it not only
maximizes, but fills the entire screen without the user having to click on it
?

Are you talking about the report's Zoom level?

Code the event that opens the report:

DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.RunCommand acCmdZoom100
DoCmd.Maximize
 
G

Guest

I put in the code and got the following error:

Runtime Error '2046'
The command or action zoom 100% isn't available now.
 
G

Guest

I put in the code and got the following error:

Runtime Error '2046'
The command or action zoom 100% isn't available now.
 
R

Rick Brandt

rmcompute said:
I put in the code and got the following error:

Runtime Error '2046'
The command or action zoom 100% isn't available now.

Where did you put the code? You cannot call it in the Report's code module. It
needs to be the line following the one that opens the report.
 
F

fredg

I put in the code and got the following error:

Runtime Error '2046'
The command or action zoom 100% isn't available now.

This code does NOT go in the report, it goes in the event (i.e. the
Command Button click event on a form) that you use to open the report.
 
G

Guest

It worked. Thank you.

Rick Brandt said:
Where did you put the code? You cannot call it in the Report's code module. It
needs to be the line following the one that opens the report.
 
G

Guest

It worked. Thank you.


fredg said:
This code does NOT go in the report, it goes in the event (i.e. the
Command Button click event on a form) that you use to open the report.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top