Get warnings running Macros/Modules 
Author Message
 Get warnings running Macros/Modules

I have some Macros/Modules running some SELECT...INTO <Table> SQL Commands.

I always get the warning:

You are about to update a table....You will not be able to undo this
command...

How can I turn off this warning?  I don't really care about the update of
the table, because my Module/Macro just deleted the table on the SQL
statement prior to the SELECt_INTO...

Thanks...

PeterD



Mon, 19 Mar 2001 03:00:00 GMT  
 Get warnings running Macros/Modules
I think one work around would be to add the following code before the
Select statement "docmd.setwarnings false" then after the select statement
"docmd.setwarnings true"

Bobby



Quote:
> I have some Macros/Modules running some SELECT...INTO <Table> SQL
Commands.

> I always get the warning:

> You are about to update a table....You will not be able to undo this
> command...

> How can I turn off this warning?  I don't really care about the update of
> the table, because my Module/Macro just deleted the table on the SQL
> statement prior to the SELECt_INTO...

> Thanks...

> PeterD



Mon, 19 Mar 2001 03:00:00 GMT  
 Get warnings running Macros/Modules
On Thu, 1 Oct 1998 18:07:59 -0500, Peter DeSimone spoketh

Quote:
>I have some Macros/Modules running some SELECT...INTO <Table> SQL Commands.

>I always get the warning:

>You are about to update a table....You will not be able to undo this
>command...

>How can I turn off this warning?  I don't really care about the update of
>the table, because my Module/Macro just deleted the table on the SQL
>statement prior to the SELECt_INTO...

>Thanks...

>PeterD

1. You can't do much with macros. Convert them to Modules...

2a. You can turn off the warnings in Options

2b. You can use the CurrentDB.Execute queryorstatement to avoid the
message

2c. You can use the DoCmd.SetWarnings (True/False) to turn warnings
on/off before you run the query

LMH rogue(at)channel1 dot com |or| draupner (at) theglobe dot com
WWW http://www.channel1.com/users/rogue
FAQ:    http://members.forfree.at/~larsm
        http://home.att.net/~dashish
        http://www.hammerdata.com/Newsgrp
        http://www.channel1.com/users/rogue/Access/FAQ
        http://members.xoom.com/dashish
ICQ 10300112
Please limit questions/replies to news-group(s)...
Reply address may be foiled to fool spam-bots. Remove the obvious.
"I Killed Kenny."



Tue, 20 Mar 2001 03:00:00 GMT  
 Get warnings running Macros/Modules
go to Tools>Options>Edit/find> under confirm, deselect record changes,
action queries and document deletions. It's a quick easy way in Access97.

Melanie

Quote:
>I always get the warning:

>You are about to update a table....You will not be able to undo this
>command...

>How can I turn off this warning?



Sat, 24 Mar 2001 03:00:00 GMT  
 Get warnings running Macros/Modules

Quote:
> >I always get the warning:

> >You are about to update a table....You will not be able to undo this
> >command...

> >How can I turn off this warning?

Sorry, piggy-backing here ...

1) Use DoCmd.SetWarnings False before executing the query, and
DoCmd.SetWarnings True after executing the query.

2) Substitute DoCmd.RunSQL with CurrentDb.Execute
This method does not display the warning messages regardless of the
settings in Tools->Options. It also allows you to trap errors. See
help-file for details.

HTH
LMH rogue(at)channel1 dot com |or| draupner (at) theglobe dot com
WWW http://www.channel1.com/users/rogue
FAQ:    http://members.forfree.at/~larsm
        http://home.att.net/~dashish
        http://www.hammerdata.com/Newsgrp
        http://www.channel1.com/users/rogue/Access/FAQ
        http://members.xoom.com/dashish
ICQ 10300112
Please limit questions/replies to news-group(s)...
Reply address may be foiled to fool spam-bots. Remove the obvious.
I kill all E-Mail from hotmail.com and other known sources of spam.
"Do it once, do it right. Cremate Kenny!"



Sat, 24 Mar 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Macro Warning appears - No Module in doc

2. Word Macro runs then gets Macro Not Found

3. Word Macro runs then gets Macro Not Found

4. Macros in Excel: How do I avoid getting confirmation windows when I run the macro

5. Warning message on document that Macros are not running

6. Macro Warnings without macros

7. Run word macro from Access module code

8. Run Excel Macro from within Access module

9. Pause Module while Excel macro runs?

10. Problem running macro in module from ThisOutlookSession

11. Getting macro to run on exit from FormField

12. Sending e-mail via a Module warning?

 

 
Powered by phpBB® Forum Software