Supressing Delete Record msgbox

ben.hornshaw

Registered User.
Local time
Today, 09:48
Joined
May 30, 2009
Messages
21
Hi all

I have created a Delete Record Query. this works great but when i click my delete button i have created a message box asking if you are sure you want to delete record "" when the user clicks yes i then get two more message boxes, one saying are you sure you want to delete data and the second saying are you sure you want to remove 1 record.

Is there any way of getting rid/supressing these two message boxes?

Thanks
 
Is the button running a macro, or a VBA sub?

If it's VBA, insert DoCmd.SetWarnings False immediately before the line that does the deleting, and DoCmd.SetWarnings True immediately after it.

Not sure how you do it in a macro.
 
Or do
Code:
currentdb.execute currentdb.querydefs("qryName").sql
HTH:D

Dito: Not sure how you do it in a macro.
 
@Guus
How about simply: currentdb.execute "qryName"

That seems "a little" easier isnt it?
 
@Guus
How about simply: currentdb.execute "qryName"

That seems "a little" easier isnt it?
You are demistyfying the problem.

It's a fast cut and paste because I usually add a where clause at the end.
But you're completely wright.
 

Users who are viewing this thread

Back
Top Bottom