smercer
Registered User.
- Local time
- Tomorrow, 01:15
- Joined
- Jun 14, 2004
- Messages
- 442
Hi all
I am customizing the function keys and soon found that all the function keys have changed.
the function keys are going to do different things in different forms and need to not have global shortcut keys (most of the time).
here is my code:
Can anyone help?
Thanks in advance
I am customizing the function keys and soon found that all the function keys have changed.
the function keys are going to do different things in different forms and need to not have global shortcut keys (most of the time).
here is my code:
Code:
If KeyCode = vbKeyF11 Then
DoCmd.SetWarnings False
DoCmd.OpenQuery "udt_Variables_Previous_Form_Book_Entry"
DoCmd.SetWarnings True
DoCmd.OpenForm "frm_Find_Book" 'will open the datasheet "frm_Find_Book" into a new window
Me.sfrm_Book_Entry_Book_Description_Record_selected.Form.RecordSource = "qry_Book_Entry_Book_Description_Find_Book_Record_Selected" 'will change source in sfrm_Book_Entry_Book_Description_Record_selected to "qry_Popup_Record_Selected"
sfrm_Book_Entry_Book_Description_Record_selected.Requery
sfrm_Book_Entry_Book_Description_in_Store_Index.Visible = False 'will hide the form "sfrm_Book_Entry_Book_Description_in_Store_Index"
Else
If KeyCode = vbKeyF12 Then
DoCmd.SetWarnings False
DoCmd.OpenQuery "udt_Variables_Correct_Pass_True"
DoCmd.SetWarnings True
DoCmd.OpenForm "frm_Book_Sales" 'will open the "frm_Book_Sales" form
DoCmd.Maximize 'this will Maximize the "frm_Book_Sales" form
Forms!frm_Book_Sales!Book_ID_Lookup.SetFocus 'sets the focus to Book_ID_Lookup in form "frm_Book_Sales"
DoCmd.Close acForm, "frm_Book_Entry_form", acSaveYes 'this will close "frm_Book_Entry_form" saving any data not already saved
End If
End If
Can anyone help?
Thanks in advance