A
arnold
I have a macro in Access that I want to run when someone clicks a
command button. The code is as follows:
Private Sub Terminate_Click()
On Error GoTo Err_Terminate_Click
Dim stDocName As String
stDocName = "Terminate"
DoCmd.RunMacro stDocName
Exit_Terminate_Click:
Exit Sub
Err_Terminate_Click:
MsgBox Err.Description
Resume Exit_Terminate_Click
End Sub
I would like to add a confirmation dialog box to confirm that the user
wants to terminate the record. How do I add that to the code to make
it work? If they click "no" I want it to return to the record. If
they click "yes" I want to it run the macro. Any help would be
appreciated!
command button. The code is as follows:
Private Sub Terminate_Click()
On Error GoTo Err_Terminate_Click
Dim stDocName As String
stDocName = "Terminate"
DoCmd.RunMacro stDocName
Exit_Terminate_Click:
Exit Sub
Err_Terminate_Click:
MsgBox Err.Description
Resume Exit_Terminate_Click
End Sub
I would like to add a confirmation dialog box to confirm that the user
wants to terminate the record. How do I add that to the code to make
it work? If they click "no" I want it to return to the record. If
they click "yes" I want to it run the macro. Any help would be
appreciated!