| Chat with a LIVE Microsoft
Access Expert! |
||||
|
||||
|
#1
|
||||
|
||||
|
Error Trapping
In using a Transfer Text method, I sometimes end up with an _Import Errors table which I delete using DeleteObject using code. However since the I don't always obtain the _Import Errors table, how do I avoid Error 3011 from coming up and allow me to continue the remaining code?
I have tried Error: 'for Error 3011 i.e. "No Error Table" If Err.Number = 3011 Then Resume Next End If but it doesn't work. [This message has been edited by aziz rasul (edited 10-16-2001).] |
| Sponsored Links |
|
#2
|
||||
|
||||
|
Just before the "DeleteObject" add this line of code:
On Error Resume Next Then right after return it to the standard error handler Err.Clear 'Clears the Error Variable On Error Goto Error: Since you know can error will occur on this line and since the Error has no effect on the rest of the code this method will work.
__________________
Travis L Abrahamson |
|
#3
|
||||
|
||||
|
Travis:
Many thanks for the code. It worked. Bob Larson: Appreciated your comments. I use an import/export spec. However the reason why I obtain the error table is because I sometimes have a Null value in a particular field. Hence knowing that this is the problem, I simply delete the offending error table. |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|