Solved

ms access faster query method

Posted on 2012-03-17
4
220 Views
Last Modified: 2012-07-19
I have a query that I am running when a button is clicked.  I am using the DoCmd.Openquery method to run the query.

Is there a method/code that is faster in access to run the query.  I know ther are other ways to sepcify and run a query - wanted to know what my option are.

Here is the query:

INSERT INTO AC_DB2ADMIN_VIEWAECAPHEADER
SELECT DB2ADMIN_VIEWAECAPHEADER.*
FROM DB2ADMIN_VIEWAECAPHEADER;

Thanks for your help.
0
Comment
Question by:johnmadigan
4 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 37733510
Try just this;

CurrentDB.Execute "YourActionQueryName", dbFailOnError

If you have DoCmd.SetWarnings False   anywhere, Comment that out.

mx
0
 
LVL 45

Expert Comment

by:aikimark
ID: 37733850
I don't see a Where clause.  Do you mean to insert all the DB2ADMIN_VIEWAECAPHEADER rows?
0
 
LVL 44

Expert Comment

by:GRayL
ID: 37735925
Can you explain what you are trying to do with that query - I see taking all the records from a given table and inserting them back into the same table?
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Close Print Preview button not active 12 36
Run Time Error 3071 26 37
Error in Rs.MoveNext & Duplication of Record 14 25
can't find file error on web browser 1 15
This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now