I have a delete button on my form (command270), which removes a record from table A. Table A is related to table B with referential integrity, cascade delete and cascade update applied.
When I click on the delete button I firstly set warnings false, but I still get a message to warn me regarding related records being deleted.
If I remove the relationships and delete I still get a message to warn '1 record being deleted' etc...
How do I suppress these system messages?
My code runs as follows:
Private Sub Command270_Click()
DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 ' acDelete
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 ' acCopy
MsgBox "This record has been deleted"
DoCmd.SetWarnings True....'etc,etc
End Sub
Thanks for any help.
When I click on the delete button I firstly set warnings false, but I still get a message to warn me regarding related records being deleted.
If I remove the relationships and delete I still get a message to warn '1 record being deleted' etc...
How do I suppress these system messages?
My code runs as follows:
Private Sub Command270_Click()
DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 ' acDelete
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70 ' acCopy
MsgBox "This record has been deleted"
DoCmd.SetWarnings True....'etc,etc
End Sub
Thanks for any help.