J
jsiburt
I have a made a custom toolbar with a button that runs the following module
Function CurrentPage()
Dim intCurrentPageNo As Integer
Dim strMsg As String
intCurrentPageNo = Screen.ActiveReport.Page
strMsg = "You are on page " & intCurrentPageNo
MsgBox strMsg
End Function
It basically pops up a Message box that tells you which page of a report you
are on. The eventual purpose is to code in the printing of just the page
that you are viewing.
The code works fine when the report loads. On page 1 it says "You are on
Page 1", clicking the bottom navigation buttons to move forward and clicking
the button again yields "You are on Page 2".
However, clicking the "BACK" navigation button and returning to page 1
yields the following "You are on Page 2" Apparently the code is having
problems counting backwards. Tested on a 10 page report, if you navigate to
page ten and then back to page one pushing the buttons says "You are on Page
10".
Is there any workaround for this behaviour?
Thanks,
Jason
Function CurrentPage()
Dim intCurrentPageNo As Integer
Dim strMsg As String
intCurrentPageNo = Screen.ActiveReport.Page
strMsg = "You are on page " & intCurrentPageNo
MsgBox strMsg
End Function
It basically pops up a Message box that tells you which page of a report you
are on. The eventual purpose is to code in the printing of just the page
that you are viewing.
The code works fine when the report loads. On page 1 it says "You are on
Page 1", clicking the bottom navigation buttons to move forward and clicking
the button again yields "You are on Page 2".
However, clicking the "BACK" navigation button and returning to page 1
yields the following "You are on Page 2" Apparently the code is having
problems counting backwards. Tested on a 10 page report, if you navigate to
page ten and then back to page one pushing the buttons says "You are on Page
10".
Is there any workaround for this behaviour?
Thanks,
Jason