Michelle K. said:
All design changes I am making in my database are saved on object close.
There is no "save changes?" question asked. Is there a setting that does
that?
I feel that docmd.runsql and docmd.setwrnings should never be used.
The problem with DoCmd.RunSQL is that it ignores any errors. Either
of the following will display any error messages received by the
query. If using DAO, use Currentdb.Execute strSQL,dbfailonerror..
For ADO use CurrentProject.Connection.Execute strCommand,
lngRecordsAffected, adCmdText You can then remove the
docmd.setwarnings lines.
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
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages -
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog -
http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see
http://www.autofeupdater.com/
Granite Fleet Manager
http://www.granitefleet.com/