control boxes (1 Viewer)

R

Ralph

Guest
I am using the following code for control boxes to allow users to easily move from one form to the next or previous form. One of my problems is that the control does not bring the user to the next form in the same record. What am I missing that would make this flow better.

Private Sub cmdGoToPage3_Click()
On Error GoTo Err_cmdGoToPage3_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "COP Page 3"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_cmdGoToPage3_Click:
Exit Sub

Err_cmdGoToPage3_Click:
MsgBox Err.Description
Resume Exit_cmdGoToPage3_Click

End Sub

Ralph
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 00:52
Joined
Feb 19, 2002
Messages
43,266
You are not putting a value in stLinkCriteria
.
 

Users who are viewing this thread

Top Bottom