p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

access thread: Access 97 - Default Options for Break on Errors!


Message #1 by ipike@t... on Fri, 7 Sep 2001 15:08:51
I having problems setting the Options for Advanced- 'Break on errors'. 

Access 97 is defaulting to 'Break on Errors in Class modules', but I can't 

get the value to persist to another value, ie 'Break on All Unhandled 

errors'. This means when I open the database after changing it to another 

value, it returns to 'Break on Errors in Class module'



Has any got any ideas how to modify this problem.



Environment is Windows NT with Access97 plus Visual Studio and Office 97.



Many thanks Ian.
Message #2 by "Pardee, Roy E" <roy.e.pardee@l...> on Fri, 07 Sep 2001 07:52:02 -0700
Those options can be set programmatically--if you haven't yet, step through

the initialization code and see if it isn't getting un-set for you.



HTH,



-Roy



-----Original Message-----

From: ipike@t... [mailto:ipike@t...]

Sent: Friday, September 07, 2001 8:09 AM

To: Access

Subject: [access] Access 97 - Default Options for Break on Errors!





I having problems setting the Options for Advanced- 'Break on errors'. 

Access 97 is defaulting to 'Break on Errors in Class modules', but I can't 

get the value to persist to another value, ie 'Break on All Unhandled 

errors'. This means when I open the database after changing it to another 

value, it returns to 'Break on Errors in Class module'



Has any got any ideas how to modify this problem.



Environment is Windows NT with Access97 plus Visual Studio and Office 97.



Many thanks Ian.
Message #3 by ipike@t... on Fri, 7 Sep 2001 16:40:28
Hi.



managed to find an answer on the internet, just after my post! See below 

extract, thanks for the help!



Ian.



Ps. Thanks for who ever posted this original on another site..



You can use SetOption.



I would look at doing something like the following in each class:-



'******************************

'Code Start

'******************************

Private intErrHand As Integer



Private Sub Class_Initialize()

  Const BREAK_UNHANDED = 2

  intErrHand = GetOption("Error Trapping")



  Call SetOption("Error Trapping", BREAK_UNHANDED)



End Sub



Private Sub Class_Terminate()

  Call SetOption("Error Trapping", intErrHand)

End Sub

'******************************

'Code End

'******************************



Then when class objects are created break on unhandled errors will be in

force, but then when the class object is destroyed the setting will revert

to whatever th euser was using.







> Those options can be set programmatically--if you haven't yet, step 

through

> the initialization code and see if it isn't getting un-set for you.

> 

> HTH,

> 

> -Roy

> 

> -----Original Message-----

> From: ipike@t... [mailto:ipike@t...]

> Sent: Friday, September 07, 2001 8:09 AM

> To: Access

> Subject: [access] Access 97 - Default Options for Break on Errors!

> 

> 

> I having problems setting the Options for Advanced- 'Break on errors'. 

> Access 97 is defaulting to 'Break on Errors in Class modules', but I 

can't 

> get the value to persist to another value, ie 'Break on All Unhandled 

> errors'. This means when I open the database after changing it to 

another 

> value, it returns to 'Break on Errors in Class module'

> 

> Has any got any ideas how to modify this problem.

> 

> Environment is Windows NT with Access97 plus Visual Studio and Office 97.

> 

> Many thanks Ian.

  Return to Index