A
Adam Thwaites
I have to following code to hide the Database Window when I press the H key,
but without the name Access has given to the Database Window I can't shift
focus to it automatically to hide it. Can anyone help me out?
Also how could I have the code working on a Ctrl+x keypress?
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyH Then
DoCmd.SelectObject acForm, ,True
CommandBars("Menu Bar").Controls("Window"). _
Controls("Hide"). _
accDoDefaultAction
Forms!frm_Main.SetFocus
End If
End Sub
--
Adam Thwaites
Access Database Designer
Manchester, UK
(I have no access to other sites apart from microsoft.com so posting
external links is no use to me)
but without the name Access has given to the Database Window I can't shift
focus to it automatically to hide it. Can anyone help me out?
Also how could I have the code working on a Ctrl+x keypress?
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyH Then
DoCmd.SelectObject acForm, ,True
CommandBars("Menu Bar").Controls("Window"). _
Controls("Hide"). _
accDoDefaultAction
Forms!frm_Main.SetFocus
End If
End Sub
--
Adam Thwaites
Access Database Designer
Manchester, UK
(I have no access to other sites apart from microsoft.com so posting
external links is no use to me)