Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To delete a record just when user sure!! 1

Status
Not open for further replies.

Fekri

Programmer
Jan 3, 2004
284
IR
Hi,

I have a continoius form which has a bottun on each record to delete record.
and when the user clicking on it, the popup window will apear that are you sure? yes or No.
Now, my problem is I put a query in onafterdelconfirm of forms to run that query when the record actuallu deleted.
But when the user clicking the NO on popup Delete windows, still the query will run!!!!
where I have to put this query to run just when the record actually deleted?????


Thanks & Good Luck
Ali Fekri
 
The AfterDeleteConfirm fires even if the delete is canceled (see HELP).

So maybe you need to make your own little pop-up form or Msgbox, so if MSGBOX = vbNo you cancel the delete, but if it = YES you delete the record and run your query.

See this: thread702-1201843

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Thanks and That's perfect,

But after my own popup delete window, again normal delete window also will appear!! how to determin that??


Thanks & Good Luck
Ali Fekri
 
I found it:

Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
Response = acDataErrContinue
End Sub


Thanks & Good Luck
Ali Fekri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top