473,597 Members | 2,341 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to disable or redefine the Ctrl - hotkey which deletes a record

Anyone know how to disable or redefine the Ctrl - hotkey which deletes a
record? I have a multi page form that uses 14 records, each record
handles 1-2 pages of the 18 page form. Occasionally , after being there
initially, one of the records becomes deleted. I have found I can cause
this by pressing CTRL and the MINUS key simultaneously. Even the
confirm delete doesn't work.

Any way to redefine the function of CTRL + MINUS?

Bob
Oct 11 '07 #1
3 3915
Bob Alston wrote:
Anyone know how to disable or redefine the Ctrl - hotkey which deletes a
record? I have a multi page form that uses 14 records, each record
handles 1-2 pages of the 18 page form. Occasionally , after being there
initially, one of the records becomes deleted. I have found I can cause
this by pressing CTRL and the MINUS key simultaneously. Even the
confirm delete doesn't work.

Any way to redefine the function of CTRL + MINUS?

Bob
I created a temp from with the following code.

Private Sub Form_AfterDelCo nfirm(Status As Integer)
DoCmd.SetWarnin gs True
End Sub
Private Sub Form_BeforeDelC onfirm(Cancel As Integer, Response As Integer)
DoCmd.SetWarnin gs False
End Sub
Private Sub Form_Delete(Can cel As Integer)
If MsgBox("Delete record?", vbDefaultButton 2 + vbYesNo, _
"Confirm Delete") = vbNo Then
Cancel = True
End If
End Sub
Private Sub Form_KeyDown(Ke yCode As Integer, Shift As Integer)
If Shift = 2 And KeyCode = 189 Then
MsgBox "Stop That!"
End If
End Sub

If KeyPreview is set to YES for the form, I see StopThat but the code to
delete never is executed.

If KeyPreview is set to NO, I get the message asking for confirmation.
If I say Yes, the record is deleted. If not, the record is saved from
deletion. You'll notice I set the default of the Yes/No to No.

What version of Access are you running?
Oct 11 '07 #2
Salad wrote:
Bob Alston wrote:
>Anyone know how to disable or redefine the Ctrl - hotkey which deletes
a record? I have a multi page form that uses 14 records, each record
handles 1-2 pages of the 18 page form. Occasionally , after being
there initially, one of the records becomes deleted. I have found I
can cause this by pressing CTRL and the MINUS key simultaneously.
Even the confirm delete doesn't work.

Any way to redefine the function of CTRL + MINUS?

Bob

I created a temp from with the following code.

Private Sub Form_AfterDelCo nfirm(Status As Integer)
DoCmd.SetWarnin gs True
End Sub
Private Sub Form_BeforeDelC onfirm(Cancel As Integer, Response As Integer)
DoCmd.SetWarnin gs False
End Sub
Private Sub Form_Delete(Can cel As Integer)
If MsgBox("Delete record?", vbDefaultButton 2 + vbYesNo, _
"Confirm Delete") = vbNo Then
Cancel = True
End If
End Sub
Private Sub Form_KeyDown(Ke yCode As Integer, Shift As Integer)
If Shift = 2 And KeyCode = 189 Then
MsgBox "Stop That!"
End If
End Sub

If KeyPreview is set to YES for the form, I see StopThat but the code to
delete never is executed.

If KeyPreview is set to NO, I get the message asking for confirmation.
If I say Yes, the record is deleted. If not, the record is saved from
deletion. You'll notice I set the default of the Yes/No to No.

What version of Access are you running?
Thank you. I was focusing on the bigg issue of CTRL + MINUS which I
cannot trap when viewing the table. But OF COURSE I can trap a form
delete via the ON DELETE function. that is GREAT and will address my
specific issue.
Oct 11 '07 #3
On Wed, 10 Oct 2007 20:01:22 -0500, Bob Alston <bo********@yah oo.com>
wrote:

I would think you could create a do-nothing entry for it in the
AutoKeys macro.

-Tom.

>Anyone know how to disable or redefine the Ctrl - hotkey which deletes a
record? I have a multi page form that uses 14 records, each record
handles 1-2 pages of the 18 page form. Occasionally , after being there
initially, one of the records becomes deleted. I have found I can cause
this by pressing CTRL and the MINUS key simultaneously. Even the
confirm delete doesn't work.

Any way to redefine the function of CTRL + MINUS?

Bob
Oct 12 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5910
by: Greg | last post by:
I am developing an application where I need to secure a workstation for periods of time. I can use BlockInput to stop users from task switching or messing with the keyboard, but I would like to disable Ctrl-Alt-Delete. It seems there seems to be only one real way I know about: Write a replacement Gina Driver to eat the keyboard events I dont want. Does anyone have a good template for this in Visual Basic .Net?
3
3882
by: bonehead | last post by:
Okay, here's a question I should have posted a very very long time ago. I'd like to prevent the user from being able to bypass certain error handling and updating functions that are programmed into the "Save" command button. Some of my apps are still running in A97, but most are now running in A2K or subsequent versions. Is it possible to disable the use of hotkey combinations such as "Ctrl+S" in an Access application? If so, how? And...
4
3559
by: | last post by:
I want to program a application for user login in windows.Now I has some question about disable the system hotkey(c+a+d,alt+tab,win key.etc.) and limit the mouse cursor in winform How can I do it? thanks!
3
7099
by: Glen Hong | last post by:
I have set up a hotkey using RegisterHotKey API function for Ctrl-Tab. Firstly, I can rap this when Ctrl-Tab is pressed however if I want to add an addition hotkey how can I distinguish between which hotkey was pressed? Secondly I am trying to replicate the Ctrl-Tab functionality you have in the DotNet IDE when you hold down the Ctrl key and then additional use the tab key you can cycle thru the MDI Children. I would like to gain the...
3
15361
by: Kevin Bilbee | last post by:
I need to know the API call to disable the CTRL-ALT-DEL in a C# windows form. We have created a time clock application to run on a tablet PC to replace the windows shell, we are going to hang it on a wall for associates to clock in and out and check their benefits. I will disable task manager from Domain Policies but I need to disable the CTRL-ALT-DEL and also be able to renable it from a special passworded menu for administrative...
3
11972
by: vanya | last post by:
i have been tryin to program(javascript) to disable the following keystroke combinations CTRL+O or CTRL+L Go to a new location (O = 79 L = 76) CTRL+S Save the current page ( S = 83) CTRL+E Open Search in Explorer bar (E = 69) CTRL+I Open Favorites in Explorer bar (I = 73) CTRL+H Open History in Explorer bar (H=72) CTRL+ click In History or Favorites bars, open multiple CTRL+LEFT ARROW When in the Address bar, move...
3
5982
by: Richard Lewis Haggard | last post by:
Is there an easy way to disable the hotkey sequence Control F4 or otherwise prevent the action from killing off MDI child windows in VS05/WinForms 2? I've already figured out how to get rid of the 'x' in the caption bar but the hot key sequence is still allowing users to kill off MDI child windows, which I need to prevent from happening. -- Richard Lewis Haggard www.Haggard-And-Associates.com
6
17779
by: =?Utf-8?B?TWljaGFlbCAwMw==?= | last post by:
I need to disable the clipboard function in Windows XP. We are having a problem with users using CTRL+C in one program, then using CTRL+V in another. Specifically, they type their password into notepad, copy it to the clipboard, then paste it in another program. The other program runs on Windows XP. Obviously, the correct answer is to have the creators of the other program to disable pasting in a password field, but they are reluctant...
0
4558
by: =?Utf-8?B?R3VpZG8gS3JhdXM=?= | last post by:
My ASP.NET web site uses some client side Javascript to capture keyboard input, especially some function keys like F12. The new IE8 uses F12 to open up some developer tool window. Is it possible to disable the F12 hotkey or disable the default behavior? My Javascript code looks something like this: document.onkeydown = keyDownHandler; function keyDownHandler(e) { if (!e) var e = window.event;
0
7893
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8381
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8040
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8259
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6698
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5436
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3932
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1495
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1243
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.