Chat with a LIVE Microsoft Access Expert!
 
       
 

         

   

Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
 
Chat with a LIVE Microsoft Access Expert!
Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-16-2001, 08:31 AM
aziz rasul's Avatar
aziz rasul aziz rasul is offline
Registered User
 
Join Date: Jun 2000
Location: UK
Posts: 1,173
aziz rasul is an unknown quantity at this point
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).]
__________________
Aziz

http://www.scribd.com
Reply With Quote
Sponsored Links
  #2  
Old 10-16-2001, 12:55 PM
Travis's Avatar
Travis Travis is offline
Registered User
 
Join Date: Dec 1999
Location: Kingsburg, CA, USA
Posts: 1,332
Travis is on a distinguished road
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

Reply With Quote
  #3  
Old 10-17-2001, 02:58 AM
aziz rasul's Avatar
aziz rasul aziz rasul is offline
Registered User
 
Join Date: Jun 2000
Location: UK
Posts: 1,173
aziz rasul is an unknown quantity at this point
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.
__________________
Aziz

http://www.scribd.com
Reply With Quote
Sponsored Links
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:16 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
(c) copyright 2009 Access World