Private Sub ButtonName_Click() Dim I As Integer DoCmd.OpenReport "ReportName", acViewPreview I = Reports!ReportName.Pages SendKeys "{F5}{Delete}" SendKeys I & "{ENTER}" End Sub
Change ButtonName and ReportName to what they are in your application
Happy New Year
-- Wayne Trentino, Italia.
"Richard" wrote:
[Quoted Text] > I would like to preview the last page im my report: > > Private Sub Command13_Click() > On Error GoTo Err_Command13_Click > > Dim stDocName As String > > stDocName = "rptScanlog" > DoCmd.OpenReport stDocName, acPreview > > Exit_Command13_Click: > Exit Sub > > Err_Command13_Click: > MsgBox Err.Description > Resume Exit_Command13_Click > > End Sub > > Thanks and happy new year to all.
|