Wrox Programmer Forums
|
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
 
Old September 2nd, 2004, 11:58 AM
Registered User
 
Join Date: Sep 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default What versions require unique error procedure label

Hi,

On page 269 you mention that early versions of Access required unique labels each Exit_Procedure and Error_Handler section but that later versions could use the same labels making it easy to copy and past error routines. What versions require the unique labels?

I'm using Access 2000 and hope I can use the unique labels.

Thanks,

Tom

Streesed spelled backwards is Desserts.  Go have some ice cream when you are frustrated.
 
Old September 3rd, 2004, 01:12 PM
Authorized User
 
Join Date: Jun 2004
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am currently using Access 2000 too. You can very simply answer your own question by doing the following:

1) create a new form and put a command button on the form using the Command Button Wizard. It doesn't really matter what function you have the command button do, but choose goto the first record. Give the command button a name like "Test". Edit the Test_Click event and add a line of code that you know will generate an error like:


Dummy = 12 / 0
(Don't forget to add the line ... Dim Dummy as Integer)

And comment out the line of code that the wizard created automatically for you ,,, 'DoCmd.GoToRecord , , acFirst

2) Create a second command button and give it another name, Test1, for example. Copy the code for Test_Click and paste it into Test1_Click. Now you should have two error labels in the same form module that are named exactly the same name.

Go ahead and open the form and click either of the command buttons. You should get a message box indicating that you are dividing by zero, but you should not get a message indicating.

And you just answered your own question ...

Hope this helps



Terry Waltz
 
Old September 3rd, 2004, 04:17 PM
Registered User
 
Join Date: Sep 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Terry. I should have tested it like that before. Access 2000 allows the same labels in different subroutine in the same module.

Thanks again,

Tom

Streesed spelled backwards is Desserts.  Go have some ice cream when you are frustrated.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Associating RegularExpressionValidator and Require belete ASP.NET 2.0 Basics 0 October 20th, 2007 10:26 AM
require attribute - all but... kfir XML 2 May 28th, 2006 09:45 AM
Problem with include or require cli PHP How-To 2 May 24th, 2005 11:15 AM
XML Parsing error: require </META> disaacs XSLT 1 August 6th, 2004 01:58 PM
include() vs require() kc5f Beginning PHP 2 May 23rd, 2004 10:04 PM





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