No Show Delete Confirm popup

J

Jim D

When deleting records from a form I want to create my own
delete confirm popup up because linked records will be
deleted and the default delete confirm isn't clear. I've
put a popup in the OnDelete event but the default popup
still comes up. Is there any way to disable the default
popup.

Thanks
Jim
 
J

Jim D

Thanks Bill,
I thought about that but then I would have to set that
option at start up because there's multipul users. I was
hoping there was a programatic way to do it.

Thanks again
Jim
 
A

Andy Cole

Jim

Try adding

DoCmd.SetWarnings False

and

DoCmd.SetWarnings True

around your delete code

HTH

Andy
 
A

Allen Browne

To suppress the dialog question for just this one form, use the
BeforeDelConfirm event of the form:
Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
Response = acDataErrContinue
End Sub

Using the OnDelete event to display your own message box is fine. The
functional difference is that if the user selects multiple records at a time
(e.g. in Continuous or Datasheet view), they will receive one MsgBox for
each record, whereas the default behaviour in the BeforeDelConfirm event is
one MsgBox for all.
 

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