Bypassing DELETE Query dialog's

Rixx

Registered User.
Local time
Today, 13:56
Joined
Mar 3, 2005
Messages
25
Hello all,

It can be seen from my posts that im having a lotta trouble with queries tonight! :cool: I am currently running a delete query via a form. When a command button is pressed and the delete query is activated, I want to have my own warning messages.

Ive almost done this with a message box. But it only has an "OK" button on the bottom. Can I also add a "Cancel" button aswell (on the Msgbox). More importantly, When you press OK on the msgbox, the DELETE QUERY warning dialog's appear.. Is there a way of bypassing this so the user does not have to see this?

Any help concerning this will be very much appreciated. Thanks again.

Ricky S.
 
Im not having much success on this forum. In any case, I found that the answer to my problem was using the "SET WARNINGS" command & setting it to No in my macro! This worked as intended :)

However, I am hoping someone will know how to add a "CANCEL" option to a Msgbox. I have a Messagebox with a customised error message in my macro, but is pointless without a Cancel button as the user will then be forced to proceed with the deletion.

Any help regarding this will be greatly appreciated. Thanks..


Ricky S.
 
Have you look in VBA Help for "msgbox"? Not only does it tell you how to add the cancel button, but it has sample code to handle the different choices.

BTW, don't forget to set the warnings back on after your query runs.
 
It seems the problem was a lot more difficult than previously described! I have attached the result to this post so anyone else in the future can rectify this problem if it ever arises..

One of the biggest problems was that of a prompt when executing the query.

In any case, the final result works as intended :D
 

Attachments

Users who are viewing this thread

Back
Top Bottom