Solved

ms access faster query method

Posted on 2012-03-17
4
248 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 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
default value of combobox 25 70
Access Database 2007 - automating reports being sent by email 2 58
Queries: Select, then Append, then Delete 8 41
2 Global Vars, 1 List Box 4 34
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
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.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

752 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