T
Tara
I have a form that displays client data. On the form is a command button to
take the user to the next record. What I'd like to have happen is for the
form close when the user clicks the command button but there are no
additional records to display. Here's the code currently:
Private Sub CmdTransferred_Click()
On Error GoTo Err_CmdTransferred_Click
Dim stDocName As String
stDocName = "qupReply"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.GoToRecord , , acNext
Exit_CmdTransferred_Click:
Exit Sub
Err_CmdTransferred_Click:
MsgBox Err.Description
Resume Exit_CmdTransferred_Click
End Sub
Thanks!
take the user to the next record. What I'd like to have happen is for the
form close when the user clicks the command button but there are no
additional records to display. Here's the code currently:
Private Sub CmdTransferred_Click()
On Error GoTo Err_CmdTransferred_Click
Dim stDocName As String
stDocName = "qupReply"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.GoToRecord , , acNext
Exit_CmdTransferred_Click:
Exit Sub
Err_CmdTransferred_Click:
MsgBox Err.Description
Resume Exit_CmdTransferred_Click
End Sub
Thanks!