Link to home
Start Free TrialLog in
Avatar of Andy Brown
Andy BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

MS-Access/VBA - Extracting the active variables (run-time version)

Is it possible to extract a list of all of the variables that appear in the "Locals" window - when in runtime mode?  Ideally, I could use this if an error occurs.
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Not that I've seen. I believe it is for debugging only - turn it on at watch as you step through a function, mostly when an error has occurred.
Avatar of Andy Brown

ASKER

I think you're right.  I have been using it as you mentioned, but just thought how helpful it would be to capture that information when it's running.
You could make them global variables - then they could be retrieved at all times ... until an End.
That's true and not a bad idea, but would require a big overhaul.
The free sample I have posted on my blog:
Access Crash Reporter
will collect screenshots of the application, and open forms (if not in dialog mode), collect various system information (version, OS version....) but it does not collect variables.

It can then email all this information to the email address of your choice. The screenshots gives you a pretty good idea about what is going on, from the users perspective. Whethe or not the program takes screenshots is a simple setting, so you can disable that, if you are not comfortable with that part.
SOLUTION
Avatar of Bitsqueezer
Bitsqueezer
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Anders,

yes, you were some seconds faster than me..:-)

You're right, that was the one I talked about.

Cheers,

Christian
Brilliant - I'll take a look at that.

I already have a pretty decent error handling mechanism in my application that gives me pretty much everything I need (and passes key/tracked variables through when an error occurs).  However, it would be a "nice to have", to make sure I get ALL of the variables that are in play.

Thanks guys.
Thanks everyone.