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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling MS F Key Functions

Status
Not open for further replies.

dbapps

Programmer
Oct 21, 2002
9
0
0
GB
I have a form that I wish the user to close by pressing F12. I've set Key Preview to Yes and in the on Key Down event proceedure I've used a select case statement against vbKeyF12 set to Docmd.Quit. However I keep getting the MS default for F12 of a Save As dialog box appearing which them stops the form from closing. Does anyone have a suggestion how to disable to MS default functions but still enable the use of the F Keys. I know that you can set the keycode to 0 but that stops any further use of that key.
 
Try looking in the help for the AutoKeys Macro, which allows you to map any key.
 
Thanks for the advice re the autokeys macro but I forgot to mention that I want to use other F keys on the same form to open or close other forms. I very rarly use macros and when I tried your suggestion I can only get it to carry out one F key action. Is there no way of just disabling the microsoft default function to those keys so that they only perform the action that I want.

Dave - London
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top