Hi,
I used the following code to make a report go to the last page when it opens:
Private Sub Report_Open(Cancel As Integer)
Dim I As Integer
DoCmd.OpenReport "rptEndOfDayReport", acViewPreview
I = Reports!rptEndOfDayReport.Pages
SendKeys "{F5}{Delete}"
SendKeys I & "{ENTER}"
End Sub
but I am getting this error message:
The page number you entered is invalid
for example, it may be a negative or invalid range, such as 6 to 3
Does anyone knows what's the problem and how to fix it?
Thanks in advance.
dean
I used the following code to make a report go to the last page when it opens:
Private Sub Report_Open(Cancel As Integer)
Dim I As Integer
DoCmd.OpenReport "rptEndOfDayReport", acViewPreview
I = Reports!rptEndOfDayReport.Pages
SendKeys "{F5}{Delete}"
SendKeys I & "{ENTER}"
End Sub
but I am getting this error message:
The page number you entered is invalid
for example, it may be a negative or invalid range, such as 6 to 3
Does anyone knows what's the problem and how to fix it?
Thanks in advance.
dean