Problem with On Error Resume Next in a converted database 
Author Message
 Problem with On Error Resume Next in a converted database

I recently converted an Access 97 .mdb file to Access 2000.

The conversion went fine -- no errors were reported, and it opens in
Access 2000 with no problem.

I run the following code snippet:

    On Error Resume Next

    DoCmd.DeleteObject acTable, "tbl_FINAL01"
    DoCmd.DeleteObject acTable, "tbl_FINAL02"

and I receive a message box with the following:

Run-time error '7874':

Microsoft Access can't find the object 'tbl_FINAL01.'

Which is absolutely true (it does not exist), but it appears that the On
Error Resume Next is not functioning

This code has been working without a hitch in Access 97.

What am I missing . . . ?

Is there a conversion issue that I'm not aware of?



Fri, 20 Aug 2004 09:03:20 GMT  
 Problem with On Error Resume Next in a converted database


Quote:
> I recently converted an Access 97 .mdb file to Access 2000.

> The conversion went fine -- no errors were reported, and it opens in
> Access 2000 with no problem.

> I run the following code snippet:

>     On Error Resume Next

>     DoCmd.DeleteObject acTable, "tbl_FINAL01"
>     DoCmd.DeleteObject acTable, "tbl_FINAL02"

> and I receive a message box with the following:

> Run-time error '7874':

> Microsoft Access can't find the object 'tbl_FINAL01.'

> Which is absolutely true (it does not exist), but it appears that the On
> Error Resume Next is not functioning

> This code has been working without a hitch in Access 97.

> What am I missing . . . ?

> Is there a conversion issue that I'm not aware of?

Check the Options in the Tools menu item in the VB window.  It might be that
the option (under General) "Break on all errors" is checked.  If so, change
to "Break in class module".


Fri, 20 Aug 2004 10:00:05 GMT  
 Problem with On Error Resume Next in a converted database
In the Microsoft Visual Basic window (which you can display by selecting
Tools, Macro, Visual Basic Editor), select Tools, Options.  In the Options
dialog that appears, click the General tab.  Check the Error Trapping
setting.  If it's "Break on All Errors", your execution will stop on all
errors even if you have an error handler.  Try "Break on Unhandled Errors".
Check the help for details.


Quote:
> I recently converted an Access 97 .mdb file to Access 2000.

> The conversion went fine -- no errors were reported, and it opens in
> Access 2000 with no problem.

> I run the following code snippet:

>     On Error Resume Next

>     DoCmd.DeleteObject acTable, "tbl_FINAL01"
>     DoCmd.DeleteObject acTable, "tbl_FINAL02"

> and I receive a message box with the following:

> Run-time error '7874':

> Microsoft Access can't find the object 'tbl_FINAL01.'

> Which is absolutely true (it does not exist), but it appears that the On
> Error Resume Next is not functioning

> This code has been working without a hitch in Access 97.

> What am I missing . . . ?

> Is there a conversion issue that I'm not aware of?



Fri, 20 Aug 2004 09:59:18 GMT  
 Problem with On Error Resume Next in a converted database
Carl,

1. In a code module, select the Tools menu --> Options. The Options dialog
box is displayed.
2. Select the General tab.
3. Under [Error Trapping], ensure that the [Break on Unhandled Errors]
option is selected.
4. Click OK.

- Graham R Seach MVP


Quote:
> I recently converted an Access 97 .mdb file to Access 2000.

> The conversion went fine -- no errors were reported, and it opens in
> Access 2000 with no problem.

> I run the following code snippet:

>     On Error Resume Next

>     DoCmd.DeleteObject acTable, "tbl_FINAL01"
>     DoCmd.DeleteObject acTable, "tbl_FINAL02"

> and I receive a message box with the following:

> Run-time error '7874':

> Microsoft Access can't find the object 'tbl_FINAL01.'

> Which is absolutely true (it does not exist), but it appears that the On
> Error Resume Next is not functioning

> This code has been working without a hitch in Access 97.

> What am I missing . . . ?

> Is there a conversion issue that I'm not aware of?



Fri, 20 Aug 2004 10:02:46 GMT  
 Problem with On Error Resume Next in a converted database
Thank you all for being so nice about pointing out something I should have
been able to catch myself.

And for responding so quickly.

I wish they were all this easy . . .

Thanks again -- all of you.

Carl



Fri, 20 Aug 2004 10:26:33 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. On local error resume next Vs on error resuem next

2. On Error Resume Next problem and ADO memory leak

3. On Error Resume Next (but Only with Specific Error, like Err.Number = 70)

4. cmd.Errors.Count Not Working (On Error Resume Next)

5. Runtime error(3012): On error resume next

6. Wish List Vote: Resume and Resume Next in Try blocks

7. On Error Resume Next being ignored

8. On Error Resume Next has no effect

9. Resume Next doesn't trap error

10. ON ERROR RESUME NEXT Failure?

11. On Error Resume Next question

12. Undoing On Error Resume Next

 

 
Powered by phpBB® Forum Software