Article ID: 100156
Article Last Modified on 1/18/2007
="Page " & [Page] + [Enter a Starting Page Number] - 1
'******************************************************
'Declarations Section of Module
'******************************************************
Option Explicit
Global PageChoice As Integer
'===========================================================
'Create the following GetPageChoice() function in the Module
'===========================================================
'This function is called in the OnOpen property of the Report.
Function GetPageChoice ()
Dim choice As String
Do
choice = InputBox("Enter a Starting Page Number:"," _
Number Report", "1")
If Not (IsNumeric(choice)) Then
MsgBox "Value Entered is not a Number."
End If
Loop While Not (IsNumeric(choice))
PageChoice = CInt(choice)
End Function
'==============================================================
'Create the following ReturnPageChoice() function in the Module
'==============================================================
'This function is called by the text box that will contain the
' pagenumber.
Function ReturnPageChoice (pgnumber As Integer)
ReturnPageChoice = PageChoice + pgnumber - 1
End Function
OnOpen: =GetPageChoice()
="Page " & ReturnPageChoice(Page).Keywords: kbhowto kbprogramming kbusage KB100156