Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable CTRL + F key

Status
Not open for further replies.

rhonda11

Technical User
Nov 4, 2002
96
US
I would like to disable the CTRL + F key in a form. The form already have a lookup field control of a Combo box. I would like the user to use that combo box to retreive a particular record. I don't want them to find any other field by pressing the CTRL + F key. Is that possible?

Thank you
 
Hi Rhonda,

Not the most secure solution around but I have created an autokeys macro for ctrl-f (you use ^f in the macro build window. I set the action to CancelEvent.

Did the trick here with Access 2002.

See "Autokeys" in the Access help if you think this will work for you.

There may well be a more elegant or secure way to stop users hitting ctrl-f.

Regards,

Peter Remember- It's nice to be important,
but it's important to be nice :)
 
An AutoKeys macro would be activated throughout your application, not just when the one form is active.

A better solution would be to create a form KeyDown event procedure. When the procedure receives a Ctrl+F key combination, it focuses your combo box, sets the KeyCode parameter to 0 (to prevent Access from also responding to it), and exits.

You also need to set the form's Key Preview property to Yes. Rick Sprague
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top