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!

Disable F12 (save record) on forms

Status
Not open for further replies.

paqguy

Instructor
Nov 1, 2001
36
0
0
US
I'm trying to do field validation using the form before update event. I cancel the event if the validation fails. I'm trapping for a keydown of F12 so that I can mimic a previous software package used by the data entry people. When the user presses F12, I want to execute the click event of the cmdNext button I added for user navigation. It works fine, unless the field validation fails, causing the before update event to get canceled ... for some reason this triggers the F12 key to act like the Save Form button, which is the normal behavior, but I want to override this.

More information or is that enough? Any ideas?

paqguy - Shaun Beane
Instructor/Developer
sbeane@verizon.net
 
Where are you trapping the F12?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Create an AutoKeys macro and trap the F12 key press that way. A simple "StopAllMacros" action would do the job, or you could display a message advising the user that this button has been disabled.

Search for AutoKeys in Access Help for more details.

Ed Metcalfe.

Please do not feed the trolls.....
 
i'm trapping for the f12 in Keydown and for the field validation in the form's Before Update event.

I'll try the autokeys thing, didn't think of that. Thanks.



paqguy - Shaun Beane
Instructor/Developer
sbeane@verizon.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top