Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Variables In Debug Window

Status
Not open for further replies.

kelele

Programmer
May 22, 2001
12
US
[bigglasses]

I am building an elaborate error handling function to be used in a large Access Application. The function will be called from the error handlers of all other subs in the application, and uses the Err object as its sole argument.

The error handlers primary purpose is to log errors in a text file. I am trying to get as much information as possible about the applications environment when an error occurs. Is there a way I can print the values of all active variables into this text file?

Thanks!
 
I don't believe that varaibles are held in a collection anywhere - ( which would be the easy answer ) so let's think laterally .. ..

How about - Create a table, call it tblVariables and everytime a variable comes into scope then append its name to the table; and when it goes out of scope delete it from the table.
Then On_Error you have your own personal variables collection to cycle through and write out to the text file.

This method might encouragle you to make variables have a wider scope than they would otherwise need -to limit table appends and deletes - ( and that is not a good thing ) and it might degrade performance a bit but only you can assess the implications of these things.




'ope-that-'elps

G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top