SetPage

This function sets the page number (PageNo) or the page name (Name) to receive focus.

Group: Application-Based Extension


Syntax: [ByVal = ] App.SetPage (byVal iPage As Long, [bSaveRSP], [bValidateRSP])

viPage         (Long) is the PageNo of the page receiving the focus.

bSaveRSP     (Boolean) Optional – set to True to save any changes to the current page value before switching focus to the new prompt.

bValidateRSP (Boolean) Optional – set to True to call the edit checks and to re-run the OnEnter event.

Example

Private Sub GoToPage(pageNo As Long, pageName As String)

On Error Resume Next

 Dim bSaveRsp As Boolean

 Dim bOK As Boolean

   If RadioButton1.Checked = True Or RadioButton3.Checked = True Then

     bSaveRsp = True

     End If

   If RadioButton1.Checked = True Or RadioButton2.Checked = True Then

     bOK = App.SetPage(pageNo,bSaveRsp)

  Else

     bOK = App.SetPage(pageName, bSaveRsp)

  End If

     If bOK = False Then

     App.MsgBox "App.SetPage Failed"

  End If

 End Sub

Version Supported:      RFgen 5.1 and newer.