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
|