Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / September 2007

Tip: Looking for answers? Try searching our database.

how can I eliminate the warning message in an append query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sandi G - 20 Sep 2007 15:36 GMT
I want to eliminate the warning "cannot append all the records..." when
appending records to an index (no duplicates) tables.
Jerry Whittle - 20 Sep 2007 15:44 GMT
Run the query either within a macro or module. Start either with Set Warnings
off; run the query; then, and this is important, Set Warnings back on.
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> I want to eliminate the warning "cannot append all the records..." when
> appending records to an index (no duplicates) tables.
Tony Toews [MVP] - 20 Sep 2007 22:47 GMT
>I want to eliminate the warning "cannot append all the records..." when
>appending records to an index (no duplicates) tables.

First I'd design your query so it doesn't append duplicates if at all
possible.   This takes more time and disk IOs to process.   Also I
prefer not to consume needlessly autonumbers but I'm just a neat freak
where possible.

I prefer, if DAO, to use Currentdb.Execute strSQL,dbfailonerror
command instead of docmd.runsql.  For ADO use
CurrentProject.Connection.Execute strCommand, lngRecordsAffected,
adCmdText  

If you're going to use docmd.setwarnings make very sure you put the
True statement in any error handling code as well.   Otherwise weird
things may happen later on especially while you are working on the
app.  For example you will no longer get the "Do you wish to save your
changes" message if you close an object.  This may mean that unwanted
changes, deletions or additions will be saved to your MDB.

Also performance can be significantly different between the two
methods.  One posting stated currentdb.execute took two seconds while
docmd.runsql took eight seconds.  As always YMMV.

Tony
Signature

Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
  Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.