|
-
April 25th, 2001, 02:44 AM
#1
Running SQL queries
I am running an SQL query in an Access 2000 database, using the DoCmd.RunSQL "INSERT INTO ...." command.
The SQL INSERT query is executed without any problems, but I would like not to get the message box that prompts the user to confirm the operation. ("You are about to append..." , "Microsoft Access can't append all the records...").
Is there a way to programmaticaly answer "Yes" to all of those questions?
Thanks,
Yaron.
-
April 25th, 2001, 07:25 AM
#2
Re: Running SQL queries
You can either turn off warning messages in Acces or use the code
DoCmd.SetWarnings False(true)
This is a VBA call. In Access, this will turn off system warnings, such as "1000 records will be deleted" -
it acts as if you select the default (hit enter) at each of these prompts, allowing your code or macro to run
without user intervention.
Iouri Boutchkine
[email protected]
-
June 1st, 2006, 07:21 AM
#3
Re: Running SQL queries
If you are using an ADO to execute the access queries from in VB, what command can be used not to get the warning messages? The code for the ADO execution is:
cmdAccess.Execute , , adasyncexecute
The problem I have is that my execution from VB seems to cancel when the warning message for access appears. If there is no warning message my query executes and data is inserted into the sql table.
as far as I know ADO command objects should not have a problem with warning messages from Access.
can anyone help me please, this is quite urgent?
Last edited by cvdnest; June 1st, 2006 at 08:56 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|