Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 8th, 2009, 06:27 PM
Registered User
Join Date: May 2009
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Default Preventing User Code Break via Control Break key

Does anyone know how to stop a user interrupting MS Access visual basic code execution using a "Control-Break" key combination.

It is possible to set the database properties to prevent VB code being exposed to a user when an unhandled error occurs, however this does not stop the code being transparently interrupted by a user.

AutoKeys does not recognise "^{BREAK}" as a valid key combination, so that seems to rule out using this approach to trap a "Control-Break".

Excel supports a method that allows "Control-Break" to be either trapped or ignored; MS Access does not appear to have an equivalent.

You can do all the fancy stuff you like, but if a user can stop your code in its tracks, your application has one very large flaw built right in!!
Reply With Quote
  #2 (permalink)  
Old May 8th, 2009, 06:31 PM
Authorized User
Join Date: Jul 2008
Location: Portland, OR, USA.
Posts: 38
Thanks: 1
Thanked 2 Times in 2 Posts

Go to the startup options and remove the USE ACCESS SPECIAL KEYS checkmark from the checkbox. That should do it for you.

Bob Larson
Access MVP (2008-2010, 2011)
Free Access tutorials, samples, tools
Reply With Quote
The Following User Says Thank You to boblarson For This Useful Post:
chris.bragg (May 8th, 2009)
  #3 (permalink)  
Old May 13th, 2009, 09:52 AM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG

Wow, I'm curious as to why your users are using the CTRL+BREAK combination on any program! Are they purposely seeking to sabotage their work?!
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why there isn't a "break"? XVenus Java Basics 1 September 4th, 2007 06:37 AM
help with 'break' Manu Sharma Beginning PHP 3 March 15th, 2007 09:04 PM
how do i break it up? kuehhc Beginning PHP 3 January 19th, 2005 09:52 AM
Unable to Break at Break point Girishbk VB.NET 2002/2003 Basics 0 January 18th, 2005 08:29 AM

All times are GMT -4. The time now is 05:15 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.