Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Access 2003 VBA Programmer's Reference
This is the forum to discuss the Wrox book Access 2003 VBA Programmer's Reference by Patricia Cardoza, Teresa Hennig, Graham Seach, Armen Stein; ISBN: 9780764559037
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Access 2003 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
  #1 (permalink)  
Old August 16th, 2004, 04:36 PM
Registered User
 
Join Date: Aug 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Selection criteria on index form - p422

Could someone please give me a pointer to what I'm doing wrong? I cannot get the following code to work; p423 and p424. It seems that there should something after the "&" before Err.Description:

[codePrivate Sub cboActivityType_AfterUpdate()
On Error GoTo Error_Handler

    SelectRecords
    cboActivityType.Requery

Exit_Procedure:
    On Error Resume Next
    Exit Sub
Error_Handler:
    MsgBox "An error has occurred in this application. " _
    & "Please contact your technical support person " _
    & "and tell them this information:" _
    & vbCrLf & vbCrLf & "Error Number " & Err.Number & ", " &
Err.Description , _
    Buttons:=vbCritical, Title:="TestWorklog"
    Resume Exit_Procedure
    Resume

End Sub][/code]
  #2 (permalink)  
Old August 17th, 2004, 08:55 AM
Authorized User
 
Join Date: Jul 2004
Location: Sydney, NSW, Australia.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Err.Description , _
    should be on the same line as the text above it, like so:

& vbCrLf & vbCrLf & "Error Number " & Err.Number & ", " & Err.Description , _

Also, remove "[code" from the first line, and "[/code]" from the last line.


Graham R Seach
Microsoft Access MVP
  #3 (permalink)  
Old August 18th, 2004, 06:45 AM
Authorized User
 
Join Date: Jun 2004
Location: Cumberland, MD, USA.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Has this been submitted as an errata?

Terry Waltz
  #4 (permalink)  
Old August 18th, 2004, 09:13 AM
Authorized User
 
Join Date: Jul 2004
Location: Sydney, NSW, Australia.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Terry,

Chapter 14 isn't one of mine, but although I agree the offending line should perhaps have been split before Err.Description, I don't think it constitutes errata.

Kota possibly doesn't know what a line-continuation character is, or what it's for. Perhaps (s)he just missed it. That's OK, (s)he's now learned something useful. I'm afraid I don't know where
Code:
 and
came from; they aren't in the book.

Nevertheless, if you feel this is an error, then please feel free to submit it.

Graham R Seach
Microsoft Access MVP
  #5 (permalink)  
Old August 18th, 2004, 09:20 AM
Authorized User
 
Join Date: Jul 2004
Location: Sydney, NSW, Australia.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Now that constitutes errata! I forgot that this is an HTML forum, so some text was omitted from my last post. What I meant to say was...

I'm afraid I don't know where {code} and {/code} came from; they aren't in the book.

Graham R Seach
Microsoft Access MVP
  #6 (permalink)  
Old October 10th, 2006, 11:21 PM
Registered User
 
Join Date: Oct 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by tlwaltz
 Has this been submitted as an errata?

Terry Waltz
  #7 (permalink)  
Old October 10th, 2006, 11:38 PM
Registered User
 
Join Date: Oct 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by kota
 Could someone please give me a pointer to what I'm doing wrong? I cannot get the following code to work; p423 and p424. It seems that there should something after the "&" before Err.Description:

[codePrivate Sub cboActivityType_AfterUpdate()
On Error GoTo Error_Handler

    SelectRecords
    cboActivityType.Requery

Exit_Procedure:
    On Error Resume Next
    Exit Sub
Error_Handler:
    MsgBox "An error has occurred in this application. " _
    & "Please contact your technical support person " _
    & "and tell them this information:" _
    & vbCrLf & vbCrLf & "Error Number " & Err.Number & ", " &
Err.Description , _
    Buttons:=vbCritical, Title:="TestWorklog"
    Resume Exit_Procedure
    Resume

End Sub][/code]
this is a test

  #8 (permalink)  
Old October 10th, 2006, 11:39 PM
Registered User
 
Join Date: Oct 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

this is another test



Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Criteria for Report MArgente Access 10 June 8th, 2007 12:30 PM
selection criteria... dbrook007 Other Programming Languages 0 February 21st, 2006 04:41 PM
selection index changed in datagrid lily611 General .NET 1 July 21st, 2004 07:56 AM
Print selection criteria on report sjperl VB Databases Basics 1 May 3rd, 2004 11:41 PM
Report Heading Based On Selection Criteria Fo CloudNine Access 5 March 4th, 2004 08:09 PM





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