Hi Greg, lol. Just to prove some people actually listen and learn from you... :-) From a previous set of posts and a resulting "discussion" with you I've now gotten into the habit of and am *very slowly* "upgrading" old procedures to use... On error resume next Do Something If err.number <> 0 then select case err.number Do this case else do that end select endif on error goto 0 ... for all the places where I think I might get an error... data base access/ file access and so on. I have to admit to not doing a Clear though. ...And yes... I've built a sort of error log procedure as well. I've found that because I use word/access/excel vba, creating a txt file is much more useful than using the native application and easier to port across applications... and I now use it to log other stuff as well like what's happened and how much of it as well as user login logoff and usage information. The files get quite big though and I'm not sure if and/or when I should wipe them clean. Having said that I'm a strong advocate of having more than enough information rather than missing out on just the information that you need. Maybe I should try to write a log file filter/analyser for my own log files!LOL! :-) Regards Lisa > -----Original Message----- > From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx]On > Behalf Of Greg Chapman > Sent: 10 December 2003 21:18 > To: mso@xxxxxxxxxxxxx > Subject: [mso] Re: DoCmd.SetWarnings for Access 2000 > > > > This is often overlooked and of vital importance to > successfully using On > Error Resume Next. Using the statement by itself is usually > fine but, as > noted, errors are ignored and the code moves on. You don't > have to stop > here, however, as there are plenty of times you want to > know the error > before moving on, make a note of it, perform some other action, etc. > > In those instances where you might expect an error you can > test the value > of the Error object. Here's an example using your code: > > sgSQL = "DROP TABLE tblTempDP;" > On Error Resume Next > DoCmd.RunSQL sgSQL > If Err <> 0 Then > strErr = Now() & " " & Err.Number & _ > ", " & Err.Description & " executing " & _ > sgSQL > LogError '(a logging routine you might consider building) > Err.Clear > End If > > With this information logged, you can finish the job and > have a reference > to which parts of the process failed and records of why the failure > occurred. > > Greg Chapman ************************************************************* You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or MicrosoftOffice@xxxxxxxxxxxxxxxx To send mail to the group, simply address it to mso@xxxxxxxxxxxxx To Unsubscribe from this group, send an email to mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in the subject line. Or, visit the group's homepage and use the dropdown menu. This will also allow you to change your email settings to digest or vacation (no mail). //www.freelists.org/webpage/mso To be able to use the files section for sharing files with the group, send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with instructions. Once you are a member of the files group, you can go here to upload/download files: http://www.smartgroups.com/vault/msofiles *************************************************************