opening the database window

aphelps

Bird Man
Local time
Today, 10:21
Joined
Aug 2, 2002
Messages
32
Howdy--

I have an "idiot-proofed" frontend. When the DB opens, the database window is hidden. However, I want to put a password-protected button on the main switchboard page that, when clicked opens a password form. With the right password and a click, then, it will open the DB window. This is to allow those I deem worthy direct access to the tables and structure, whilst keeping out the riff raff who could gum up the works.

I know how to get the password form, etc., but I can't determine how to get it to open the database window. I don't particularly want to have to recreate the list of tables, and the list of queries, and the list of forms, etc.

Thanks--
 
Check out the StartupShowDBWindow Property in the help system for VB in Access
 
The below code will disable (hide) all menu bars and tool bars. Ensure that you have a way to enable (unhide) the menu bars and tool bars (transparent command button) before you hide them!

'this will disable all menu bars and tool bars
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i

'this will enable all menu bars and tool bars
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = True
Next i

An added bonus is the right click option is disabled if the menu bars are disabled with the above code.

Use the 'ShowToolbar' command if you need to display a toolbar...
DoCmd.ShowToolbar "YourToolBarNameHere", acToolbarYes

This will hide a toolbar when needed...
DoCmd.ShowToolbar "YourToolBarNameHere", acToolbarNo

You can also hide/unhide the database window with code...

'Hide the database window
DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide

'Unhide the database window
DoCmd.SelectObject acTable, , True


HTH
 
Once again, you have been extremely helpful. Works like a charm. I don't know where I'd be without this forum--probably still working on some apps I finished months ago.

Thanks again--
 

Users who are viewing this thread

Back
Top Bottom