Access Crash Reporter


Some of you may have heard me talk about this pet project of mine on LinkedIn or elsewhere, and now I am finally ready to share it. This is my crash reporter tool, version 1.0. It has already gone through a lot of changes since the beta version, and I still have features and stuff I wish to add, but I think it is time to start letting others use it. For download links, see the bottom of this page.


What is this Crash Reporter?

If you have worked with users for a while you have probably found out that they are not always the most reliable source of information for details on error reporting.

If you (the developer) are sitting in the same building, they might just swing by, and have you come take a look at their monitor. But what if they are in another building, or another city? Well a few options could occur:

  • They never report the error to you and just continue to try to use the program, but eventually get tired of getting the same error and blame you, even though they actually did not do anything to give you a chance to correct the error.
  • They send you an email or phone you up, and this might be an example of the dialogue to take place:
    • User/Client: “Hey Developer, we had an error”.
    • Developer : “Okay, can you tell me what the error number was?”
    • User/Client: “I think it started with a 6, or maybe a 7”
    • Developer: “Hmm. ok, what were you doing at the time?”
    • User/Client: “I was working in the tool”
    • Developer “Yes, but which screen or form were you using?”
    • User/Client: “The one with the big textbox for details!”
    • Developer: “Okay, what did you do right before the error occurred?”
    • User/Client: “I was browsing the internet”
    • Developer: “I meant in the application”
    • User/Client: “Oh, I think I was updating a customer record”
  • (rare) They take a screenshot and write a detailed error report saying what they were doing, and include relevant details about the error number, error description and what else they might have been doing just before.

Now imagine how nice it would be if every user did option 3. But wait, what if we could help turn regular users into those super users? The good news is that, now you can! With this free piece of software you can now present a pretty looking error form and AUTOMATICALLY generate detailed and useful error reports including screenshots of all your open forms and the application.

Form example:



Example of error report:

Error ID:F9AE94266E3943DBB1D664959A33868F
==== Error Message as presented to user ====
Error 91 has occurred in procedure [cmdCauseError_Click] in module [TSC_ErrRep_frm_Test_ErrorReportTool]
Object variable or With block variable not set

This error was raised in order to test the Error report functionality

==== Error Number ====

==== Error Line (0 if N/A) ====

==== Error Description ====
Object variable or With block variable not set

==== Error in Module ====

==== Error in Procedure ====

==== Session Information ====
==== Application Information ====
Name : TSC_ErrorReporter – BETA.mdb
Path : C:\Users\Documents\Applications\ErrorReport\TSC_ErrorReporter – BETA.mdb
Active Form : TSC_ErrRep_frm_Test_ErrorReportTool
Active Control : cmdCauseError
Parent Form(if any) : TSC_ErrRep_frm_Test_ErrorReportTool
Active Datasheet : N/A
Active Report : N/A
Open forms : TSC_ErrRep_frm_Test_ErrorReportTool

==== Access Info ====
Version : 14.0
Build : 6024
Fileformat : 10
DB Version : 4.0
==== Time of Error ====
15-03-2013 15:01:55

==== Windows User Name ====

==== Active Form ====

==== Active Control ====

==== Active Control Parent Form ====

==== Active Data Sheet ====

==== Active Report ====

==== All Open Forms ====

==== Application Version ====

==== TheSmileyCoders Crash Reporter Version Info ====

==== Application Version ====

==== Minutes application has been running ====

==== Hours since last Windows reboot ====

What else can it do?

All error information is also stored in a table. This table can be local or networked. The error report is of course error resistant so even if no connection is available to the network, the reporter will continue, and store all the information into a text-based log file, which can be emailed along with the screenshots to your email!

Email Options

TheSmileyCoders Crash Reporter is setup to use either Outlook or CDO (with Gmail). To use the built in CDO you need to have a Gmail account setup that you can use for this purpose, however if you are more experienced in CDO, you should be able to setup the Crash Reporter to use other email accounts. Screenshots and error log are automatically attached.

That sounds expensive!

Nope, I have chosen to provide this tool absolutely free of charge, under the Creative Commons 3.0 license. For more details see This means that you may use, alter, copy, redistribute and include this code in your application, provided that you include the attribution details specified in each module.


Why is that? Well, maybe I could sell this tool for some nice money, but the fact is that I want to give something back to the Access community which has helped me learn and evolve to the point where writing such an application is possible, and also because I would rather see my hard work being put to good use, and because I am not big on marketing. But hey, when that first error report ticks into your mailbox, if you find my Crash Reporter useful, why not drop a thank you comment on my blog? Those comments are the real return-value for me. And if my tool really helped you find and solve a nasty bug, then you can always buy me a beer, by pressing the PayPal donation link.
All donations are welcome, no matter the size.



Setup and Use

For setup information, you can watch this YouTube video, and/or read on:


Before you start using the Crash Reporter, you need to modify the following settings found in the TSC_ErrRep_Main module. I have highlighted the areas that need to be set if you use Outlook as your email client.

‘ – Err reporter settings

‘Place YOUR email here, the email which the reports should be sent to
Public Const gReportErrorToEmail As String = “

‘Place the name of your application in here. It will be used in various message boxes and captions
Public Const gAppName As String = “TheSmileyCoders Report Tool

‘Place the name of your company, or your own name here
Public Const gDeveloperName As String = “TheSmileyCoder

‘Choose whether to use Outlook or CDO for mail
Public Const gUseOutlook As Boolean = True

‘Place details on the Gmail account for which to use CDO to send error message
Public Const gSendUserName As String = “”
Public Const gSendPassword As String = “”

‘Set whether or not to take a screenshot, and whether to include it per default
Public Const gTakeScreenshot As Boolean = True
Public Const gDefaultSubmitScreenshot As Boolean = True

‘Whether or not to dim the background as the submit error form is opened
Public Const gDimBackground As Boolean = True ‘Default is true

‘Version of Error report tool in use
Public Const gErrorReportToolVersion As String = “1.0”

If you want to use CDO instead, so you don’t have to rely on the user having outlook installed, you can modify the following settings:

‘Choose whether to use Outlook or CDO for mail
Public Const gUseOutlook As Boolean = False

‘Place details on the gmail account for which to use CDO to send error msg
Public Const gSendUserName As String = “
Public Const gSendPassword As String = “YourPassword

I would suggest not using your own gmail, but creating a Gmail account specifically for this purpose.


Now with the settings in place, you need to import all the objects from the sample database, into your application. The only object that is not required is the test form. Once imported, start by checking that it compiles fine within your environment, by selecting Debug->Compile in the VBA editor. Then you need to look at your error handling procedures, and modify them to use the error report tool. Now if you already have error handling code, it might look something like this:

Private Sub YourCode()
On Error goto ErrHandler

 'Some code

  Exit Sub

  Msgbox Err.Number & " - " & err.Description
  Resume ExitSub

End Sub

Now instead of that plain old message box saying there has been an error, you can now use the Error reporter. Simply replace the MsgBox line with:

TSCs_ReportUnexpectedError "Name of your procedure", "Name of module or form", "Custom info"

and the tool will handle the rest, including taking screenshots, preparing the error report, and opening the error report form.


In this blog post I presented my new Crash Reporter. With this you can easily get much more detailed and useful information when a bug/error occurs in your software, and users get presented with a much nicer looking custom form, instead of the plain old windows message box.

The download comes with a test form, so you can start experimenting with the Crash Reporter today!


[download id=”435″]

Known Issues

If you are using tabbed forms in your access application the Crash Reporter will sometimes only take a screenshot of the topmost (the visible/active) form.

Version History

1.1 Fixed a bug with screenshots if a form was open in design view. Changed dbOpenTable to dbOpenDynaset for cases where errors are stored in a linked table.

1.0 First release


36 comments on “Access Crash Reporter
  1. Tom van Stiphout says:

    Great idea. Thank you for sharing.
    I would like to provide some feedback via email. Can you send me your email address?

    Tom van Stiphout
    Microsoft Access MVP

    • TheSmileyCoder says:

      Hi Tom
      Glad you like the idea.
      You can email me at SmileyCoder(do not include this)tools at
      Email is also included in the code in the sample database.

  2. Pat says:

    I don’t see a link to download the tool.

  3. TheSmileyCoder says:

    The link is just below the Download header. No signup or membership is required to download.

  4. Terrence Kuchel says:

    Absolutely love this example, will make life a lot easier with error reporting.

    One quick questions how did you set the code window to be black and green. I know it’s not related to the article just curios.

  5. Seth Schrock says:

    Do you have a list of what code was changed to make version 1.1? I have implemented V 1.0 is a handful of databases and I don’t want to totally wipe everything out and start over “just in case”. I found the difference with the forms in design view, but I don’t know where else the changes were made.

    • TheSmileyCoder says:

      That is a good idea. I don’t have that I must admit. I shall strive to make that in future releases. I believe I made 2 changes. One was to make sure that if the form was open in design view, it would not try to screenshot it. Second was to switch from using dbOpenTable to dbOpenDynaset on the error storage table, in case people were using a networked table to store the information.

      Thank you for your feedback.

  6. Jose Ignacio says:

    This tool is an awesome idea and it works great!

    Thanks for sharing your ideas and professional code.

    This tool also has already the capability super users want to do to these days; Send a report as email body. Instead of building more overhead, or users manually use MS Paint to take a screenshot.

    The idea is that when management receive our reports before or without opening all the attachments, preview the Key Performance Indicators (KPIs), show Statical Process Control(SPC) charts and Tables, a summary of all the attached reports(PDF’s, Excel Sheets, etc) that is contained in one reports been attached.

    If you Google the Access forums you’ll see how many questions without a complete answer had been ask about this topic.

    Going in to the trouble of building HTML templates, inter-op with other MS apps, etc.. I think is much easier to use your tool to take a screenshot of a report and attached to the Body of email.

    Can this be done with your tool functions? are there any issues to be aware or any other issues limitations?

    Thanks again for this a great tool!

    • TheSmileyCoder says:

      Thank you for your feedback!
      I am sure something could be worked out using bits and pieces of the code available, but I don’t have any time on hand at the moment due to a rather large house renovating project.

  7. James says:

    Thank you, thank you. This has made my tool much more professional, and made it much easier for me to fix bugs.

  8. Daniel says:

    It would be nice to make the CDO more generalized than just GMail, and thus make the Server, Port, … const variable easily editable in a config section or better yet what I do in my application is merely have this info in a table.

    Nice utility though and thank you for sharing with us all. I know how much work goes into developing such a tool firsthand!

    • TheSmileyCoder says:

      Hi Daniel
      Thank you for your comment. The truth is that I have never really worked with CDO, and thus my experience is limited. I got it to the point where I made the gmail solution work, and then didn’t really spend more time on it. Personally I have only ever been in situations where outlook was installed, and in those cases I choose to use outlook as I have more experience there.

  9. Manuel says:

    Hi there, I was hoping you might be able to advise; I’m getting a message which says “Screenshots could not be taken due to error [48].” I’m using the 64 bit version of Access on Windows 8.1.

    I changed the functions to PtrSafe and stepped into the code and found that the code errors out on the line which reads “r = OleCreatePictureIndirect(Pic, IID_IDispatch, 1, IPic)” (line 367 of the TSC_ErrRep_ScreenCapture Module).

    I was thinking it might be an issue with me not having olepro32.dll in my C:\Windows\System32, so I copied it over from C:\Windows\SysWOW64 but no such luck. Is there anything you can think of to help? Thank you for developing this tool!

    • TheSmileyCoder says:

      Hi Manuel
      I don’t have experience with 64 bit, and don’t really have a way of testing it either, even if I did come up with something.

  10. Roger Alexander says:

    Hi Anders

    I have just started using the Access Crash reporter and installed a new application on one of my client’s pc.

    The return address email is a sub address on my Google account.

    The client used it to send me an email detailing an error on the application and I recieved a message from Google to say that someone (my client) has my account details and blocked the message.

    I have had to indicate that this is one of my devices and Google will continue to monitor it for two weeks.

    Is there a security problem here?


  11. TheSmileyCoder says:

    Hi Roger
    Glad to hear it.
    As stated in the article, if you use gmail to send error reports I would recommend using a separate “dummy” account, as the application will need to contain username and password, and obviously you wouldn’t want to give out those details for your real account.
    E.g. for customer “Joes Autoshop” I might setup an email account “” and use that account to send emails FROM.
    Of course if the client has outlook, it might be easier to simply use that option.

    Hope that helps to clarify.

  12. Roger Alexander says:

    Hi Anders

    Thanks for replying to my question and will take your advice to use a dummy account.

    By the way I was so wrapped up in issue I forget to mention what a brilliant piece coding this is. It has already given a much more professional feel to the application and helps me speed up the debugging process

    Congratulations and thanks for the freebee!!

  13. Mike Rod says:

    I like your tool, it is a great way to report crashes, errors and things like that.
    I’m using Outlook and it will not send the email it give me “An Error [287-Application-defined or Object-defined Error] has occurred trying to generate the Outlook Email”. how do I fix this?

  14. Mike Rod says:

    Good morning, the line that fails is the following :
    Set oOutlookRecip=.Recipients.Add(gReportErrorToEmail)

  15. Mike Rod says:

    it is set to my E-mail “Public Const gReportErrorToEmail As String = “here it has my outlook email address.”

    • TheSmileyCoder says:

      That is quite odd. I have tried this code with several clients now, and never had an issue, so I am not sure what to even suggest.

      What happens if you open outlook manually, create a new email, and place your email address into the To field, exactly the same as it is written in the code, and then click the “check names” button? Does it resolve that address or give an error?

  16. Mike Rod says:

    I just did the check names and it resolves it with no issues. You are quite right, this is really odd.

    • TheSmileyCoder says:

      My guess it that there is some security setting that is preventing automated use of the address book. You could try to replace the trouble some lines with:
      oMail.To=gReportErrorToEmail, and skip anything related to .Recipients

  17. Mike Rod says:

    Thank you sir.
    I tried using the line you gave me but I’m not that advance, I wouldn’t know where to put it and how to skip anything that is related to recipients.
    I appreciate all your help ans of course your time as well.

  18. Hi Anders

    Just discovered your crash reporter tool after clicking on a link from UA. I created my own similar error reporting routine for very similar reasons to you and it works in a very similar way.

    When an error occurs, details are logged and an email is sent to the program administrator for info with a copy emailed to me as the developer.

    The error log includes the following:
    – error number & description ; date & time
    – name of database object & control / procedure causing the error
    – user ID / workstation / Windows version / Access version / screen resolution

    The user sees an enhanced error message.
    If they are a program administrator the message form also contains a button linking to the error log & another button which opens a Google search for that error.

    If I’d known about yours I could have saved myself a lot of work!

    The main differences to yours are as follows:
    1. The emails are sent automatically and ‘silently’ using the default email settings for the program (either CDO or Outlook). In other words, I stopped relying on users to send the email as they often couldn’t be bothered….
    2. I don’t include screenshots as I couldn’t get it to work reliably.
    I may look at how you did that …

    The error log also allows me to run program analytics which can be used to identify where most errors occur & to whom…

    Unable to attach screenshots here but if you are interested, please email me & I’ll send you more info

  19. Jeremy says:

    Wow, Thanks for this great tool. It has helped me tremendously.

  20. Hi, love the error reporter. Wondering if you ever looked further into the 64 bit issue with this tool. The tool is amazing and I’ve used on several projects. Great work!! Why don’t you charge for this. 🙂 Anyway, anyone worked out the issue with getting the screen shots with 64 bit versions of Access? 64 bit is becoming as common as 32 bit in business, and to keep using this tool i think we’ll have to figure this out. 🙂 Look forward to your replies.

    • TheSmileyCoder says:

      Yes, actually I did. I recently had a client using 64 bit, so was forced to figure it out 🙂
      I shall try to get an updated version posted.

  21. Chris says:

    Hi and thank you for this great tool.
    Unfortunately i have “error 3035: System resource exceeded”.
    Do you have an idea why?

    I’m using Office 365 Business
    Access Ver 1912 (Build 12325.20298 Click to Run) x32
    Windows 10 Pro Edition x64 Ver 1909 Build 18363.592
    16 Gb Ram
    Intel Core i7 2.70GHz

    Screenshot :

    Thanks in advance


    • TheSmileyCoder says:

      Hi Chris
      I have not come across that error before. If you use the test form, does it also give the error? I’m wondering if its specfic to the form in your screenshot

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.