Solved

ms access faster query method

Posted on 2012-03-17
4
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) 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 46

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

623 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