Wrox Programmer Forums
|
BOOK: Access 2010 VBA Programmer's Reference
This is the forum to discuss the Wrox book Access 2010 Programmer's Reference by Teresa Hennig, Rob Cooper, Geoffrey L. Griffith, Jerry Dennison; ISBN: 978-0-470-59166-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Access 2010 VBA Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 11th, 2013, 11:49 AM
Registered User
 
Join Date: Dec 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default P 222 Ch 7 Error Handling

There seems to be a problem with the following code from P. 222

Code:
 
Error_Handler
 On Error Resume Next
 DisplayUnexpectedError Err.Number, Err.Description
my DisplayUnexpectedError sub was returning "0" for ErrorNumber and " " for ErrorDescription

On MSDN I found the following information

"The properties of the Err object are reset to zero or zero-length strings ("") after an Exit Sub, Exit Function, Exit Property, or Resume Next statement in an error-handling routine. Using any form of the Resume statement outside of an error-handling routine will not reset the properties of the Err object. You can use the Clear method to explicitly reset Err."

When I removed the line "On Error Resume Next" the code worked correctly.

Last edited by joker2of5; December 11th, 2013 at 12:19 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 18 - Try it out: Handling Exceptions Site Wide (OtherErrors.aspx) Tulsi BOOK: Beginning ASP.NET 4 : in C# and VB 0 October 9th, 2013 09:21 AM
ch 18 - Try It out: Handling Exceptions Site Wide Tulsi BOOK: Beginning ASP.NET 4 : in C# and VB 10 September 12th, 2013 01:30 PM
Exception Handling Tip - Ch. 18, p.695 Tulsi BOOK: Beginning ASP.NET 4 : in C# and VB 5 June 6th, 2013 10:34 AM
Ch 15 Try It Out, Handling Global Errors, p.583 VictorVictor BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 February 26th, 2006 10:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.