By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,149 Members | 885 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,149 IT Pros & Developers. It's quick & easy.

access how to by pass an error

P: 91
i have the following code
Expand|Select|Wrap|Line Numbers
  2. On Error GoTo TableTest_Error
  4.                    Set rs3 = CurrentDb.OpenRecordset(strsql3)
  6.                   GoTo continue
  8. TableTest_Error:
  9.                   If Err.Number = 3061 Then
  10.                     Call Err.Clear
  11.                     GoTo next_table
  12.                   Else
  13.                     MsgBox Err.Description ' or whatever you find appropriate '
  14.                   End If
here in certain cases strsql3 will not execute as the field being got might not be there in table so i get error 3061,
i am trying to by pass the error but the error keeps popping at line no 4

Nov 10 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 2.5K+
P: 2,545
This does not seem a well-thought out way to do things - trying to open a recordset when the fields of the recordset may not match - but as you have provided no detail of what you are trying to do we can't advise on better ways to do it.

Remove your current error-handling altogether, including the On Error statement. Use

On Error Resume Next


Please note that this will result in you not being notified you of any errors at all, at least not until you override that On Error statement with a different one.

Nov 10 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.