AllowBreakIntoCode Property
You can use the AllowBreakIntoCode property to specify whether or not the user can view Visual Basic code after a run-time error occurs in a module.
Setting
The AllowBreakIntoCode property uses the following settings.
Setting | Description |
---|---|
True (–1) | Enable the Debug button on the dialog box that appears when a run-time error occurs. |
False (0) | Disable the Debug button. |
To set the AllowBreakIntoCode property by using a macro or Visual Basic, you must first either set the property in the Startup dialog box once or create the property in the following ways:
- In a Microsoft Access database (.mdb), you can add it by using the CreateProperty method and append it to the Properties collection of the Database object.
- In a Microsoft Access project (.adp), you can add it to the AccessObjectProperties collection of the CurrentProject object by using the Add method.
Remarks
You should make sure the AllowBreakIntoCode property is set to True when debugging an application.
If the AllowSpecialKeys property is set to True, you can still press CTRL+BREAK to pause execution of Visual Basic code, even if the AllowBreakIntoCode property is set to False.
This property's setting doesn't take effect until the next time the application database opens.