Solved

ms access faster query method

Posted on 2012-03-17
4
210 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
Comment Utility
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
Comment Utility
I don't see a Where clause.  Do you mean to insert all the DB2ADMIN_VIEWAECAPHEADER rows?
0
 
LVL 44

Expert Comment

by:GRayL
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

771 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

11 Experts available now in Live!

Get 1:1 Help Now