I was able to create the CASE for Delete Record where you delete the child records first via sql and the parent record last via a DoCmd.RunCommand acCmdDeleteRecord. This works fine for a new record added, but when I try to delete existing records, only the child records are deleted and I get a RunCommand action was canceled error message. Here's sample of my code.
Code:
Select Case MsgBox("Do you want to remove this record and all related tab records below?", vbYesNo, "ERMI Database")
Case Is = vbYes
CurrentDb.Execute "DELETE FROM ERMI_COMPENSATION WHERE ERMI_ID=" & Me.ERMI_ID
CurrentDb.Execute "DELETE FROM ERMI_SITE_WORKED WHERE ERMI_ID=" & Me.ERMI_ID
CurrentDb.Execute "DELETE FROM ERMI_PRIVILEGE WHERE ERMI_ID=" & Me.ERMI_ID
CurrentDb.Execute "DELETE FROM ERMI_LICENSES WHERE ERMI_ID=" & Me.ERMI_ID
CurrentDb.Execute "DELETE FROM ERMI_CME WHERE ERMI_ID=" & Me.ERMI_ID
DoCmd.RunCommand acCmdDeleteRecord
MsgBox "This record and any tab records have been deteted"
Case Is = vbNo
MsgBox "This record was not deleted"
End Select