From: AB1 on 6 Apr 2010 12:37 I set my SetWarnings to Yes for an import and append Macro. The dialog box pops up and works correctly. If I chose no. the macro will not fuction. However my MsgBox still appears with the message that I input for when the macro works. How can I keep that msgbox from showing up if I select no when my SetWarnings dialog box answer is no?
From: Allen Browne on 6 Apr 2010 22:15 If this is Access 2007, you need to trust the location where your database resides. To trust your folder, click: * Office Button (top left) * Access Options (bottom of dialog) * Trust Center (left) * Trust Center Settings (button) * Trusted Locations (left) * Add new location (button) You may also like to consider this approach: Action queries: suppressing dialogs, while knowing results at: http://allenbrowne.com/ser-60.html -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "AB1" <AB1(a)discussions.microsoft.com> wrote in message news:8F5F93B7-E510-4C38-B4B0-AFA31BFB997C(a)microsoft.com... > I set my SetWarnings to Yes for an import and append Macro. The dialog > box > pops up and works correctly. If I chose no. the macro will not fuction. > However my MsgBox still appears with the message that I input for when the > macro works. How can I keep that msgbox from showing up if I select no > when > my SetWarnings dialog box answer is no?
From: Marco Pagliero on 7 Apr 2010 08:16 On 6 Apr., 18:37, AB1 wrote: > I set my SetWarnings to Yes for an import and append Macro. The dialog box > pops up and works correctly. If I chose no. the macro will not fuction. > However my MsgBox still appears with the message that I input for when the > macro works. How can I keep that msgbox from showing up if I select no when > my SetWarnings dialog box answer is no? If I understand the point, the problem is that the macro doesn't know that the user got a dialog box and even less that he choses no. The same if an error occurs during the query. As far as I know there is no way to tell the macro to stop in this case. But if you know a condition which is false after the query succeeded and true if the query was stopped, you can put in the next macro line the condition and "stop macro". Apart from that you must write a VBA routine which does all what the macro does, because in VBA you can catch these events. Greetings Marco P
|
Pages: 1 Prev: Getting a loading solution for our business Next: Mulit Function Query |