try this
Dim question As String
question = MsgBox("Are you sure you want to delete these records" & vbCrLf & _
" this agreement ", vbYesNo + vbCritical, "Notice")
If question = 6 Then
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDelete...