Solved

Disable menu items on switchboard

Posted on 2007-11-28
5
1,146 Views
Last Modified: 2013-11-29
how can i disable certain menu items on the switchboard based on user credentials (username). i would like to limit access to certain functions from certain users
0
Comment
Question by:ocmwila
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 20371594
ocmwila,

Might be to complicated for a beginner.
Might be better if you built you own menus and used somethoing like this:

If UserName="ocmwilla" then
    me.btnOpenForm.enabled=False
else
     me.btnOpenForm.enabled=True
end if

Are you using Access' security username or are you speaking of the Newtork Username?

JeffCoachman
0
 

Author Comment

by:ocmwila
ID: 20372327
thanx jeff
there are several menus(switchboard) and i need to disable some menu items on several of them and so i am willing to do even the complicated.
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 20374225
ocmwila,

OK, I will presume that you are talking about a network UserName, not an Access Username, created by the User level security wizard

The issue here is that the Access switchboard is not as it appears.

Every switchboard menu you see is actually THE SAME MENU!
:)

The options are changed depending of which "switchboard" you are supposed to be in.
The switchboard has fairly complex VBA code behind it, that controls the options.
It also has a "Switchboard Items" table that dictates the menus and options.
You have to make sure that none of these conflict with one another.

A better approach might be to use the User Level Security Wizard.
It is a simple and straightforward utility that creates users and groups in Access.
Some "User Group" examples are:
-Read Only
-Update users (users who only change data)
-Insert (Add) users (Users who only Add records)
-Full Permissions
...ect
You can read more on the wizard here:
http://databases.about.com/od/tutorials/ss/usersecurity.htm
http://office.microsoft.com/en-us/ork2000/HA011381171033.aspx

Once this is done, a ReadOnly user cannot edit any records.
Similarly, an Update user cannot Delete any records.

If you try to do this based on the network login you might spend too much time deciding "who can do what, in what form".
Ex.
Joan can edit customers, but she can't create orders.
Bob can delete Orders, and Customers but he can't add products.
...ect

I'm basing this on you status as "Beginner".
Most Experts will advise you not to even use the Access switchboard, because of it's many limitations.

If you are willing to "Even do the Complicated" , then my recommendation is to create your own menus an simply use code like I listed above to enable/disable certain options.
(But change “UserName” to “CurrentUser”)
If CurrentUser="ocmwilla" then
    me.btnOpenForm.enabled=False
else
     me.btnOpenForm.enabled=True
end if

Hope this helps
:)

JeffCoachman
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21186188
Forced accept.

Computer101
EE Admin
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question