OnError Resume Next Log

jj72uk

Registered User.
Local time
Today, 14:27
Joined
May 19, 2009
Messages
65
Hi All,

Just looking for some assistance....

I have an access database which has an autorun which sets off before my team gets in in the morning using autoexec and schedualed task.

The database goes through to almost 60 small databases (under 3mb each) and appends to a master table in the database. Occassionally before the overnight run takes place a user can be left connected to the database, either through there own fault or due to server latancy. We've implements a timeout function which will force access to quit at a certain time at night for all users..

As a secondary precuation we want to add in a OnError Resume next, while this element is easy enough to do what I want to be able to do is generate some sort of log file or error table, or something which will tell us which parts have errored and skipped over.

I've googled around with not much luck..

Can anyone assist me.

Thanks
 
Hi,

Would this work?

Code:
ErrorRoutine:
  Set rsTableLog = db.openrecordset(tblErrorLog)
  With rsTableLog
    .addnew
    !ErrorNumber = Err.Number
    !TableName = strTableName
    !ErrorDescription = Err.Description
    .Update
  End With
  Set rsTableLog = Nothing
  Resume Next

On error this would open the log table, add a new record (field names need changing obv) then resume next. Untested!
 
Hi,

Looks like it could potentially work, its worth testing
 

Users who are viewing this thread

Back
Top Bottom