Access 2013, Key Preview = Yes, No AutoKeys, attached code below.
Private Sub LastName_KeyDown(KeyCode As Integer, Shift As Integer)
'Allows use of Function Keys on the form
On Error GoTo Error_Handler
Select Case KeyCode
Case vbKeyF5
'Sets you up to search for a person by LAST NAME
MsgBox ("F5")
DoCmd.OpenForm "Find_Customer_Last_Start_Form", acNormal, , , , acWindowNormal
'Right, Down, Width, Height
DoCmd.MoveSize 6300, 6200, 5800, 3650
DoCmd.GoToControl "txtBxFind_Last_Name"
KeyCode = 0
End Select
Exit Sub
Error_Handler:
MsgBox "Error"
End Sub
Question is this: pressing the F5 key still gives me the Open database form for access. It has to be something i am doing wrong of course. Any suggestions. Greatly appreciated.
Thanks
Secondary Note: I set the option below with NO CHECK and still the same thing.
File -> Option -> Current DB -> Use Access special Keys (Uncheck)