Global Error Handler

Libre

been around a little
Local time
Today, 10:46
Joined
May 3, 2007
Messages
680
Hey, all.
Sorry if this subject has been discussed before - I did a search and didn't find specifically what I am seeking.

My situation is, I've been developing an ACCESS db for the past 3.5 years - while it has also been at use, here at work.
Most of my development has been seat-of-my-pants and do what works, learn the RIGHT way later on.

It has a HUGE number of forms, subs, procedures, etc.
In my haste, I haven't always been diligent about putting an error handler into EVERY SINGLE click function or procedure.
I know, lash me, I'm an idiot, but that's how it is.

Now, I want to prevent runtime errors and the dreaded END - DEBUG dialogue box.
My question, is there a quick and dirty procedure or function I can write in a module, that will kick in if the click button on the form does not have the handler?
Or, do I have to go and code a handler into each and every one that does not have it? That would be, literally, hundreds if not thousands.

I appreciate your dealing with trial-and-error types like myelf.
THX.
 
What I would suggest is going to http://www.mztools.com and downloading their free MZ Tools add-in. There is a function they have in there to add an error handler in the procedure you have your cursor in by just clicking a button. You can set up the error handler the way you want to by going into the options of the tools. I use it all the time to add procedure headers, module headers and error handlers. All it takes is a click of a button.
 
Bob-
Thanks. That would be FANTASTIC!
Now...
I did download the MZ tools - the one for VBA.
Looking at the folder after it extracted, the only .exe I see is the uninstaller. I don't see any other app in the folder.
Please, can you tell me where to go from here?
Did I download the right one?
 
It's an Access Add-in so you need to go to the Add-In Manager under Tools and add it in that way.
 
Sorry to be a pest - but I need this desperately.
I have the Add-in manager open, and I navagated to where the downloaded, extracted folder is. Nothing is available. The manager is looking for *.mda or *.mde and there is no file in the folder with those extensions.
Here is what I have in the folder:
unins000.dat
unins000.exe
MZTools3vba.dll
MZTools3.chm
sample.xsl
MZTools3vba.ini
I'm a little afraid to just experiment blindly, because if I screw up Access, or this db I'm toast.
Thanks.
 
Oops, sorry it's been a while since I had to install it.

The help file that is in the folder you have there tells you:

Manual installation
If you have the add-in DLL file but not the installer, you can install the add-in manually following these steps:

Open a MS-DOS window (Start | Programs | Command Prompt, or if you are using Windows XP, click the Start | Run... menu, type CMD and click OK).
Change to the folder (with the CD command) where you have the DLL file.
Register the ActiveX DLL of the add-in with regsvr32.exe. This utility is supplied by Microsoft and is already in the system directory of your Windows installation.
To register MZ-Tools for Visual Basic 6.0:

regsvr32.exe mztools3.dll

To register MZ-Tools for Visual Basic 5.0:

regsvr32.exe mztools3vb5.dll

To register MZ-Tools for VBA:
regsvr32.exe mztools3vba.dll

Since the system directory where the regsvr32.exe utility is located is typically in the PATH environment variable of MS-DOS, you don´t need to specify its full path, but if this is not the case, you must include it, for example:

C:\WINDOWS\SYSTEM\regsvr32.exe mztools3.dll
 
Okay - I've done all the above.
According to the help file, I should now see MZ TOOLS under the TOOLS menu. I don't. The Add In Manager still shows nothing.
Next (please) ?
Please bear with me - I'm over 50.
thx
 
I'm running Access 2003, under Windows XP pro, ver 5.1, sp2.
 
01.png



02.png



03.png
 
WOW!!!!
I see it now. I was looking under the TOOLS menu from the main window - not a module.
Once a module is open, MZ TOOLS is there, as you said.
Again, I claim an exemption from IDIOT status, as I'm over 50. Over 55, in fact.
I can't wait to play with this, it looks AWESOME!!!
Thanks a million - scale clicks are forthcoming.
 
Sometimes it takes me a bit to remember some of the most simple things. I had forgotten that it was added in there as well. So, my apologies for taking so long to remember (I'm over 40, so the brain cells are starting to retire - unfortunately I think more of them will retire before I am ever going to be able to) :)
 

Users who are viewing this thread

Back
Top Bottom