I use the following code on a button to allow a user to delete a company name from a table, however, I would like to add a pop up box that will ask if the user really wants to delete the company Yes or No. Can someone help me with this? thanks!!
Code:
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
Dim stDocName As String
stDocName = "delete_company"
DoCmd.OpenQuery stDocName, acNormal, acEdit
MsgBox "company has been Deleted"
Exit_Command1_Click:
Exit Sub
Err_Command1_Click:
MsgBox err.Description
Resume Exit_Command1_Click
End Sub