Control items that appear on the Switchboard

R

Robert_L_Ross

Ok, this may sound odd, but I think if I can get it to work it would be
pretty vaulable.

I see the code that selects what items to display on the switchboard:
Under Private Sub FillOptions()
" Set con = Application.CurrentProject.Connection
stSql = "SELECT SwitchboardID, ItemNumber, ItemText, Command, Argument
FROM [Switchboard Items]"
stSql = stSql & " WHERE [ItemNumber] > 0 AND [SwitchboardID]=" &
Me![SwitchboardID]
stSql = stSql & " ORDER BY [ItemNumber];"
Set rs = CreateObject("ADODB.Recordset")
rs.Open stSql, con, 1 ' 1 = adOpenKeyset"

I have a form that opens at database startup that finds the current user
from my User table. This form returns the User's ID (just the PriKey from
the User table), their name, start/end date and finally LEVEL. I'd like to
have let's say 3 levels (User = 1, Supervisor = 2 and Admin = 3)

Is there a way I can add a 'level' field to the switchboard table, then add
something to the FillOptions code that would basically limit the items to
fill if the switchboard.level is > user.level?

I'm thinking if you tweak the fill code, you should be able to limit items
from appearing on the menu that the user can't see. I know you can use the
User Level Security piece, but the menu items still appear even when the user
can't access that...if we can limit what appears on the switchboard, then the
user won't even see the button that they aren't allowed to press anyway.

Any ideas?

Thanks!

Rob
 

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