Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3
This is the forum to discuss the Wrox book Access 2007 VBA Programmer's Reference by Teresa Hennig, Rob Cooper, Geoffrey L. Griffith, Armen Stein; ISBN: 9780470047033
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 16th, 2009, 06:49 PM
Registered User
 
Join Date: May 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 9 - Error Funtion

On page 289. The code doesn't compile. The MsgBox with just quotes is not working. The database I am working on is a .mdb file. I have tried putting parans around it, but the VBA editor is still showing it as red.


Quote:
Originally Posted by Book
Code:
Public Sub DisplayUnexpectedError (ErrorNumber as String, ErrorDescription as String)
‘ Note: since this is a universal error handling procedure, it does not have error handling
MsgBox “An error has occurred in this application. “ _ 
& “Please contact your technical support and “ _ 
& “tell them this information:” _ 
& vbCrLf & vbCrLf & “Error Number “ & ErrorNumber & “, “ & 
ErrorDescription, _Buttons:=vbCritical, title:=”My Application”

End Sub

This is copied right from the book.

Any ideas?
Reply With Quote
  #2 (permalink)  
Old June 25th, 2009, 12:16 PM
Registered User
 
Join Date: Jun 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Upright quotes

Try using upright single and double quotes.

<code>
Public Sub DisplayUnexpectedError(ErrorNumber As String, ErrorDescription As String)
' Note: since this is a universal error handling procedure, it does not have error handling
MsgBox "An error has occurred in this application. " _
& "Please contact your technical support and " _
& "tell them this information:" _
& vbCrLf & vbCrLf & "Error Number " & ErrorNumber & ", " _
& ErrorDescription, vbCritical, "My Application"
End Sub
</code>
Reply With Quote
  #3 (permalink)  
Old June 25th, 2009, 12:25 PM
Registered User
 
Join Date: May 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I will give that a shot. Thanks!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error with chapter 7 busteronline BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 15 August 21st, 2008 03:22 PM
Using Excell Funtion in VBA coolrks BOOK: Excel 2003 VBA Programmer's Reference 1 February 8th, 2006 11:26 AM
Error: Funtion expected lameneural Classic ASP Databases 4 December 6th, 2005 08:17 PM
weird funtion calling effect/result blur_ivy ASP.NET 1.0 and 1.1 Professional 0 March 6th, 2005 11:19 PM
Parse error in error handler (Chapter 8) Funky Monk BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 August 6th, 2004 08:59 AM



All times are GMT -4. The time now is 02:05 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.