I am trying to create a delete function on a form that gives the user a choice whether to continue. The code I am using doesn't work, but if I just use the DoCmd.RunCommand acCmdDeleteRecord it does work. In both cases I have set the focus to the ProjectID control since there are subforms associated with the main form. What am I doing wrong?
Private Sub scmd8_Click()
On Error GoTo err_handle
If MsgBox("Are you sure you want to delete this record?", vbQuestion + vbYesNo, strAppName) = vbNo Then
If Err.Number = 3200 Then
MsgBox "Error: " & Err.Number & vbCrLf & Err.Description, vbExclamation, "frmProjects"