A simple way to disable a keystroke application wide is to reassign it to
something innocuous.
1. Create a new macro.
2. If you do not see a Macro Names column, choose Macro Names on the View
menu.
3. In the Macro Name column, enter:
^A
(Note: Use Shift+6 to get the caret character.)
4. In the Action column, choose an action such as:
Beep
5. Save the macro with the name:
AutoKeys
The correct name is important.
Now whenever the user presses Ctrl+A, the computer beeps and does not select
all records.
If you just wanted to do that for one form, you could turn on the form's
KeyPreview property, and use the KeyPress event to set KeyAscii to 0.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Jado" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> I have a form that opens with a database, and when the from is closed, it
> automatically exits the database. This keeps the users away from the
> underling tables queries and code.
>
> but if a user knows how, or hits a set of keys by mistake, it is possible
to
> bring up the database window along with a load of other undesired shortcut
> features.
>
> Probably the most worrying is Ctrl+A (Select All) which actually selects
> every record in the underlying recordset. if a user then presses another
> key, the database tries to delete all records (which are unrecoverable).
> This has never happened, but I'd like to prevent it before it dose.
>
> Is it possible to disable these types of shortcut keys.
>
> I'd like to leave Cut, Copy, Paste shortcuts working if possible.