ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" [RESOLVED]
Esteemed Forum Participants and Lurkers:
===============================
ACCESS 2000 (XP) & '97
I am running an SQL statement on an existing table to create a new table. How can I keep the dumb modal popup "You are about to insert a zillion records into your table" from occurring? Here is where the warning pops up:
Code:
strSQL = "SELECT * INTO " & TABLE & " FROM MASTER_EXTRACT WHERE(Prof=" & i_Profile & ")"
DoCmd.RunSQL strSQL
Thank you for your gracious comments, suggestions, and assistance.
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
Turn the alerts off before the insert and back on after. ;)
VB Code:
application.displayalerts = false 'off
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
Hey ... wait a minute ... that's the way megashaft does it in Excel! They couldn't possibly have done it the same way in Access???
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
Hah!!! I was RIGHT!
Application.DisplayAlerts in Access yields an ERROR!
"Method or data member not found"!
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
An error turning off the alerts or from the insert code?
The display alerts property will accept the default choice when they are turned off. ;)
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
When I run the function it bombs with ".displayalerts" highlighted in the first line with the message "Method or data member not found". It does NOT like "DisplayAlerts".
Code:
Application.displayalerts = False
DoCmd.RunSQL strSQL, False
Application.displayalerts = True
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
Oh, which version of access are you testing this on? 97 or 2000?
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
Doh! Memory failing.... use wdAlertsNone
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
ACCESS 2000 right now ... I don't think I have to make the top-level table generator compatible with '97.
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
My Bad :( My previous post is for words constant. :blush:
It should be True/False for Access 97+ but double check this link for it and 97.
http://msdn.microsoft.com/archive/de...html/SFE31.asp
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
Quote:
Originally Posted by RobDog888
Doh! Memory failing.... use wdAlertsNone
Could you please put this in context? I can't quite figure out how to use it ...
A most sincere "Thank you"!
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
Post #12 shows my error and you dont need that constant since it was my mistake and posted for Word and not Access.
Question: is this all being run from behind a forms button click or something?
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
Look back at my post #8 ... ACCESS:
Quote:
When I run the function it bombs with ".displayalerts" highlighted in the first line with the message "Method or data member not found". It does NOT like "DisplayAlerts".
Now that we know how EXCEL works, let's try to solve the ACCESS problem ... how to turn off (and back on, of course) Display modal popups.
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
web, maybe you don't realize this, but rob is trying to help you. Could you try to be a little less rude?
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
I found it ...
DoCmd.SetWarnings False
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
Well I'm sorry for the confusion but I am eating lunch and posting at the same time. So at least its Resolved ;)
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
... and "DoCmd.SetWarnings [True|False]" works fine.
I was going to say something REALLY nice about the Raiders, but now ...
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" ???
Quote:
Originally Posted by kfcSmitty
web, maybe you don't realize this, but rob is trying to help you. Could you try to be a little less rude?
Rob Dog ... You're the greatest! And the Raiders are the greatest team that I follow religiously!
kfcSmitty ... sorry to have bugged you with my feeble attemps at trying to convince (and tease) RobDog that he was confusing Access with Word and Excel! My signature is very sincere ...
Re: ACCESS: How To: Disable popup on RunSQL with "SELECT INTO" [RESOLVED]
Art, No worries or ofense taken :)
Even a Guru can have a bad day :blush: :(
:)