Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > BOOK: Access 2003 VBA Programmer's Reference
Password Reminder
Register
| FAQ | Members List | Calendar | 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 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 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]
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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
Reply With Quote
  #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

Reply With Quote
  #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

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
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



All times are GMT -4. The time now is 10:00 PM.


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