Previiewing a report in Fit View

Anthony George

Registered User.
Local time
Today, 21:49
Joined
May 28, 2004
Messages
105
Hi Guys

Wonder if anyone can help?

Is there a way to control the size of a report when opening it with acPreview, so that you can control the size of what pops up on the screen when the report opens.

For instance, something like:-

DoCmd.OpenReport stDocName, acPreview, "fit"

Thanks in advance for any help given

Kindest regards

Tony
 
re:

Hi,
run:

DoCmd.RunCommand acCmdFitToWindow

After your OpenReport method. The other options you have are:

acCmdZoom10
acCmdZoom100
acCmdZoom150
acCmdZoom200
acCmdZoom25
acCmdZoom50
acCmdZoom75
acCmdSizeToFit

HTH
Good luck
 
Superb, Thanks For Your Help

Hi HTH

I used the following code and it worked perfectly:-

Private Sub overdue_Click()

On Error GoTo Err_overdue_Click

Dim stDocName As String

stDocName = "Overdue"
DoCmd.OpenReport stDocName, acViewPreview
DoCmd.RunCommand acCmdFitToWindow

Exit_overdue_Click:
Exit Sub

Err_overdue_Click:
MsgBox Err.Description
Resume Exit_overdue_Click
End Sub

Thanks for your help it was much appreciated

Kindest Regards

Tony
 
re:

You're welcome.
BTW (by the way)...my name is not HTH :)...it means Hope This/That Helps.
Good luck on future projects!
 

Users who are viewing this thread

Back
Top Bottom