Refer to database window in VB

mark curtis

Registered User.
Local time
Today, 00:07
Joined
Oct 9, 2000
Messages
457
Dear all,

How do i reference the database window using VB? I am trying to assign a key combination to make it visible. I have disabled the F11 and shift keys so need my own secret key.

I also need to know how to disable keydown events when in report preview?

Thanks
Mark
 
mark,

I stole this from a post that R. Hicks made on another board but I think this will answer your first question anyway.

I used this with an input box and a If Then Statement. If the right Password was entered in the input box the database window and other options would switch from hidden mode. But you could probably make it work for other events/procedures.

Maybe these examples will help:

'To Show Database Window
Private Sub cmdShowDbWindow_Click()
DoCmd.SelectObject acTable, , True
End Sub

'To Hide Database Window
Private Sub cmdHideDbWindow_Click()
DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide
End Sub

'To Show Access Default Menu
Private Sub cmdShowDefaultMenu_Click()
CommandBars.Item(32).Enabled = True
End Sub

'To Hide Access Default Menu
Private Sub cmdHideDefaultMenu_Click()
CommandBars.Item(32).Enabled = False
End Sub



[This message has been edited by Talismanic (edited 02-14-2001).]
 

Users who are viewing this thread

Back
Top Bottom