Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

eliminating error message about append query

Status
Not open for further replies.

Jennpen1

Technical User
Sep 4, 2002
57
0
0
US
When I run an append query that deletes duplicates in a table, an error message comes up saying,"Microsoft Access can't append all the records in the append query." The error message is just telling me that some of the records will be deleted, which makes sense, seeing as I want it to delete all of the duplicates. I need to run this append query on a daily basis, and I am curious if there is any way I can keep this error message from coming up? I have already set the Required property to No and the AllowZeroLength property to Yes for all of the fields in the destination table, and the warning is still appearing. I have a feeling it is something that cannot be fixed.
 
You need the SetWarnings command.

You can either use it in VB code or the easiest way is to use a macro.

Create a new macro and enter the following:

Action Action Argument

SetWarnings No
OpenQuery Name of your query
SetWarnings Yes

You need the last line to turn the warnings back on as Access doesn't do it automatically at the end of a macro, and you won't get anymore error messages if you run further queries!!

Now, instead of running the query, run the macro instead.


 
Thank you so much for the help. It is now working the way I had wanted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top