Fit To Window

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Re Access 97 (Golden Oldie)

Is it possible to force a report to "Fit To Window" when opened in preview?

I have tried;
DoCmd.RunCommand acCmdFitToWindow

in the Form's Activate event but Access reports this command is not
available at this time.

Can this be accomplished another way?

Many thanks.
 
Pete said:
Re Access 97 (Golden Oldie)

Is it possible to force a report to "Fit To Window" when opened in
preview?

I have tried;
DoCmd.RunCommand acCmdFitToWindow

in the Form's Activate event but Access reports this command is not
available at this time.

Can this be accomplished another way?

Many thanks.

You have the correct statement, but for some reason you cannot use it from the
report's own code module. If the report is being opened via code (like pressing
a button on a form) then you can add that statement immediately after the
OpenReport line and it will work.
 
I am opening the report via a form button and your solution works perfectly!

Many thanks Rick.
 
Back
Top