Disabling ctrl-z

  • Thread starter Thread starter Paul S.
  • Start date Start date
P

Paul S.

Is there any way to change the default behavior of ctrl-z and other ctrl-key
combinations in forms? I'm getting pretty sick of losing large amounts of
information when I accidentally press the control key rather than the shift
key. It seems like a terribly destructive thing to have happen so easily.
 
Hello Paul.

Paul S. said:
Is there any way to change the default behavior of ctrl-z and other
ctrl-key combinations in forms? I'm getting pretty sick of losing
large amounts of information when I accidentally press the control
key rather than the shift key. It seems like a terribly destructive
thing to have happen so easily.

There are two was that I know of. Which one is best for you depends
on if you want this functionality in the whole database or only for
a single form.
For the whole database:
Create a macro called AutoKeys. In design view, be sure to display
the macronames column. This column can contain keyboard shortcuts
(for ctrl+z, it would be ^z), and the actions of the macro with the
macroname of a certain key combination will be executed when the
combination is pressed, replacing the default action for that
shortcut. If no action is specified, no action will be taken, not
even the default action.
If you want this functionality only in a certain form, browse online
help for the KeyPreview property and the KeyDown event.
 
Paul.

Try this - create a Macro and name it AutoKeys (you must use this
name). In the Macro Name column enter ^Z and leave the Action column
blank. Save and exit the Macro.

You could also add the following key codes on subsequent lines :-

^N (stops user creating a new database).
^P (stops user printing current form).
^X (stops user cutting current object).
^W (stops user closing current window).
^G (stops user opening debug window).
^S (stops user saving current object.
^O (stops user opening another database.

HTH.

Peter Hibbs.
 
One thing you can do is create an AutoKeys macro and assign no action to the
key combinations you want to disable. In the 'macro name' column put the ^
character (which signifies the Ctrl key) followed by the key letter in
question and leave the action column blank. Of course this will disable the
key combinations throughout the database, so you won't be able to use them in
circumstances where you might want to do so.

Ken Sheridan
Stafford, England
 
Back
Top