Switchboard command

A

AmyLou

Does anybody know how to add a command to a switchboard which users can click
on to display the database window as with the Northwind sample database
switchboard?

Thank you
 
J

Jerry Whittle

You really don't want your users to see the database window, do you? With a
few clicks of the mouse or keystrokes they can delete entire forms, reports,
queries, and tables or at least mess with them. Do frequent backups!

As much as I avoid SendKeys, this is one time to use it. Put the following
in a module. Compile and save it.

Function fOpenDBWindow()
SendKeys "{F11}"
End Function

Create a new button using Switchboard Manager. In the second dialog box
select Run Code. In the last box put fOpenDBWindow.

If talking about a home grown switchboard, put the fOpenDBWindow in the On
Click event of a button or cut out the middleman by just putting in SendKeys
"{F11}" .

You could also train your users to just press the F11 key any time that they
want to see the database window. Training users? What a concept! But can it
be done?
 
C

chris.nebinger

I generally stay away from the send keys option. The first thing that
i do is create a sendkeys macro and clear out F11.

From: http://www.mvps.org/access/general/gen0031.htm

General: Show/Hide database window from code
Author(s)
Dev Ashish


You can hide the database container window by selecting the "Display
Database Window" option under Tools Menu/Startup. However, if you need
to show or hide the window on demand afterwards, you can use one of
these ways.

To show the database window, run
Docmd.SelectObject acTable, , True

To Hide the database window, run
Docmd.SelectObject acTable, , True
Docmd.RunCommand acCmdWindowHide
 
M

missinglinq via AccessMonster.com

"Training users? What a concept! But can it be done?"

Sure it can! But it involves a truck battery, alligator clips and a good
soundproof room!
 
A

AmyLou

Thank you for responding!

I see what you mean about allowing users to access the database but it will
only be used by three other people who I trust well (enough!)

I tried the method for adding a button via the switchboard manager but
unfortunately it didn't work for me - I think it might be because i've never
worked with modules before so I may not have saved it properly? I also wasn't
sure what was meant by compile? I'm afraid i'm a complete newbie when it
comes to code. Apologies!

Thanks again
 

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