B bsells New member Local time Today, 14:46 Joined Aug 24, 2015 Messages 5 Sep 24, 2015 #1 I have a delete macro that deletes the record in the navigation pane. Unfortunately it does it with no warning. I even went in and and setwarning = true and it still doesn't. I need the warning, please help. B
I have a delete macro that deletes the record in the navigation pane. Unfortunately it does it with no warning. I even went in and and setwarning = true and it still doesn't. I need the warning, please help. B
Ranman256 Well-known member Local time Today, 15:46 Joined Apr 9, 2015 Messages 4,349 Sep 24, 2015 #2 if the macro is running a query, the the setwarning will work. if its NOT a query, what is it running?
if the macro is running a query, the the setwarning will work. if its NOT a query, what is it running?
B bsells New member Local time Today, 14:46 Joined Aug 24, 2015 Messages 5 Sep 24, 2015 #3 it is doing a RunCommand DeleteRecord
Ranman256 Well-known member Local time Today, 15:46 Joined Apr 9, 2015 Messages 4,349 Sep 24, 2015 #4 use setwarnings true openquery "qdDelrec" (build a query)
B bsells New member Local time Today, 14:46 Joined Aug 24, 2015 Messages 5 Sep 24, 2015 #5 this is what it looks like now Attachments macro.jpg 89.7 KB · Views: 178
B bsells New member Local time Today, 14:46 Joined Aug 24, 2015 Messages 5 Sep 25, 2015 #6 I hate to turn to a query when the macro performs perfectly and all i need is a warning. Any help is greatly appreciated.
I hate to turn to a query when the macro performs perfectly and all i need is a warning. Any help is greatly appreciated.
Eljefegeneo Still trying to learn Local time Today, 12:46 Joined Jan 10, 2011 Messages 899 Sep 26, 2015 #7 This may not be an optimal solution, but I always use a message box asking if the user really wants to delete the record. VbYesNo, if no, exit.
This may not be an optimal solution, but I always use a message box asking if the user really wants to delete the record. VbYesNo, if no, exit.
Eljefegeneo Still trying to learn Local time Today, 12:46 Joined Jan 10, 2011 Messages 899 Sep 26, 2015 #8 Not sure how it is done on MS2003, but on 2010 this works in the macro builder: IF MsgBox("Are you Sure?",4)=7 then StopMacro Else Your delete code
Not sure how it is done on MS2003, but on 2010 this works in the macro builder: IF MsgBox("Are you Sure?",4)=7 then StopMacro Else Your delete code