?
Solved

How to Run an Append Query in VBA without getting all the messages.

Posted on 2004-09-21
3
Medium Priority
?
401 Views
Last Modified: 2012-08-13
I have a line that runs an append query in my code
DoCmd.OpenQuery "QRY_AppendHeader", acViewNormal, acAdd
the add query Runs normally every time and the only thing I want to avoid is
to stop getting the messages from the application.

"You are about  to run an append query that will modify  data in your table"

"You are about to append 486 rows"

"Microsoft can't append all the records  in the append query"

I know that there are some fields not being Imported I take care of that in the code
but i NEED TO STOP THESE MESSAGES FROM APEARING. hOW DO i DO THAT?
0
Comment
Question by:TOPIO
[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
  • 3
3 Comments
 
LVL 18

Accepted Solution

by:
Data-Man earned 1200 total points
ID: 12118593
use the set warnings....

docmd.setwarnings false
docmd.open query....blah blah
docmd.setwarnings true


Mike
0
 
LVL 18

Expert Comment

by:Data-Man
ID: 12118600
you could also just use the execute method of the currentdb object

CurrentDb.Execute "QRY_AppendHeader"

you don't need to supress the message as there are none and the execute will run faster than the openquery method of the docmd object.

Mike
0
 
LVL 18

Expert Comment

by:Data-Man
ID: 12118603
that was fast.....Mike
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

801 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