Delete Message Box?

G

Guest

good day,

I have an invoice form that I use for new invoices with an orders subform
and payments subform.

I have the forms and subforms linked so that if I delete the invoice, it
deletes the information that I have entered in my form/subform as well.

Is there a way that I can set up a custom "Confirm Deletion" message box?
Instead of the message box stating that I am about to delete information in 1
table and any related tables?

Thanks,

Brook
 
F

fredg

good day,

I have an invoice form that I use for new invoices with an orders subform
and payments subform.

I have the forms and subforms linked so that if I delete the invoice, it
deletes the information that I have entered in my form/subform as well.

Is there a way that I can set up a custom "Confirm Deletion" message box?
Instead of the message box stating that I am about to delete information in 1
table and any related tables?

Thanks,

Brook

You can code the Form's BeforeDelConfirm event:

DoCmd.SetWarnings False
If MsgBox("Delete these",vbYesNo) = vbNo then
' Don't delete the records
Cancel = True
Else
' Do whatever else you want here if Yes is clicked
End If
DoCmd.SetWarnings True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top