Turn Import Error Logs OFF

  • Thread starter Thread starter KC_Cheer_Coach
  • Start date Start date
K

KC_Cheer_Coach

I am importing current.xls and previous.xls into an access db (2003). When I
do, two error logs are created. Everytime I import, the error logs have
different names based on the month or cycle I am working in at the time. The
error logs contain information I do not care about as they only pull in
information I tell the db not to import in the main tables. I could delete
them if they would come in as current_ImportErrors and
previous_ImportErrors...easy. But, they do not.

Is there a way to turn off this annoying error logging? I have not found a
way to do so. If not, is there a way to delete *_ImportErrors? I tried that
too and the db just laughs at me. grrr!!

Please help...
 
AFAIK, there's no way to turn them off.

To delete, use code like:

Dim dbCurr As DAO.Database
Dim tdfCurr As DAO.TableDef
Dim lngLoop As Long

Set dbCurr = CurrentDb()
For lngLoop = (dbCurr.TableDefs.Count - 1) To 0 Step -1
Set tdfCurr = dbCurr.TableDefs(lngLoop)
If InStr(tdfCurr.Name, "_ImportErrors") > 0 Then
dbCurr.TableDefs.Delete tdfCurr.Name
End If
Next lngLoop
Set dbCurr = Nothing
 
Where do I use code like this in Access 2003? I tried to put it in a module,
but it won't run. It just opens the mod screen with vb code. Is there a way I
can perform the delete in an SQL statement? Or is there something in here
that I should be changing? I am better with SQL and so-so on this...
 
No, you can't do it using SQL.

What exactly did you put in the module? Remember that the code needs to be
inside a sub or function to run.
 
This works perfectly! Thank you very much!!

Douglas J. Steele said:
No, you can't do it using SQL.

What exactly did you put in the module? Remember that the code needs to be
inside a sub or function to run.
 
Back
Top