Showing Database Window

G

Guest

Welcome to Monday!

I have a 2002 .mdb in which I want to allow viewing of the Database Window
only for specific users, when that user clicks a button. The button is
hidden/shown based upon a security level extracted from a Users table.

I can set the startup options to hide the database window, limit the menus
and block the hot keys, but how do I "undo" this and restore all of the
normal functionality when the button is clicked?

Thanks,
Bruce
 
K

Keith Wilby

BruceS said:
Welcome to Monday!

I have a 2002 .mdb in which I want to allow viewing of the Database Window
only for specific users, when that user clicks a button. The button is
hidden/shown based upon a security level extracted from a Users table.

I can set the startup options to hide the database window, limit the menus
and block the hot keys, but how do I "undo" this and restore all of the
normal functionality when the button is clicked?

You can't use code to set startup options at runtime because the app will
have already started by the time your code runs. I think the easiest way
would be to tell your selected users about the bypass key (holding the shift
key down on startup) providing that you can trust them not to tell everyone
else!

Regards,
Keith.
www.keithwilby.com
 
G

Guest

Thanks, Allen. That made the DB Window visible.

How would I restore the normal, default menus and toolbars that were turned
off by unchecking "Allow Full Menus" and "Allow Built-In Toolbars" under
Startup? The commands I found for these in Help don't take effect until the
database is closed and restarted, which kind of defeats the purpose of the
button.

Bruce
 
M

Marshall Barton

You can hide or show any tool/menu bar with variations of:

DoCmd.ShowToolbar "Menu Bar", acToolbarYes

You can hide the db window using:

DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide
 
G

Guest

Thanks, Marsh!
Bruce

Marshall Barton said:
You can hide or show any tool/menu bar with variations of:

DoCmd.ShowToolbar "Menu Bar", acToolbarYes

You can hide the db window using:

DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide
--
Marsh
MVP [MS Access]

Thanks, Allen. That made the DB Window visible.

How would I restore the normal, default menus and toolbars that were turned
off by unchecking "Allow Full Menus" and "Allow Built-In Toolbars" under
Startup? The commands I found for these in Help don't take effect until the
database is closed and restarted, which kind of defeats the purpose of the
button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top