Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password protecting swtichboard option or macro

Status
Not open for further replies.

Wiznane

IS-IT--Management
Oct 18, 2000
21
US
I have a database that is run via a switchboard menu interface. I have an option to Design database which basically closes all the forms and unhides the database editor window (this is done via a macro). Is there any way to password protect either the switchboard option or the macro itself?
If there is an easier way to protect this option as well, I'd like to hear suggestions.

Thanks.
 
If you have security set on and you sign into the database then this is a good way:

Open the Switchboard in design mode.
View Code and go to the Function HandleButtonClick
After line Case conCmdRunMacro

If rst![Argument]=&quot;YourMacroName&quot; And CurrentUser<>&quot;YourUserID&quot; Then
Msgbox &quot;You are not authorised to run this option.&quot;
Exit Sub
Endif


Bill Paton
william.paton@ubsw.com
Check out my website !
 
That sounds like an excellent way, unfortunetly, there is no security set on the database, other than a database password. This will hopefully change when I become the data administrator, but as for now, I am just doing some design. It will be in a few months, so I can tough it out till then (some users have a habit of trying to design their own queries instead of just asking me to do it, and sometimes they do more damage than good). :)
 
To setup your own user is easy:

Tools, Security, User and Group Accounts, New...

Let's say the user name you want is wiznane. Type it in both fields.

Make user a member of Group Admins.

Now you need a desktop icon for your user:

C:\.....\MSACCESS.EXE /User &quot;wiznane&quot; /wrkgrp Path of \System.mdw Path of \Your.mdb

To get the path of MSACCESS.EXE and your mdw file just do a file Find on C: for each file.

You can now test for user wiznane.




Bill Paton
william.paton@ubsw.com
Check out my website !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top