Looking for relevant Database Whitepapers? Visit the SearchOracle.com Research Library.
Joe260986 | May 2 2008 3:20PM GMT
i wont users of the database to be able to login and logout i have now made the login form but once they have logged in my switch board comes up so it doesnt really matter who loggs in ..i wont differnt switchboard options for differnt accounts
Randym | May 5 2008 2:28PM GMT
You can do this a couple of ways.
The easiest is to simply show only the buttons for what the user has permissions to. To do that, start out with ALL buttons as invisible. Next create a “SwitchBoard” table that has the “userid” and the “buttonID” that they have permission to. Then on open of the form, read the Switchboard table for the user who logged in and show the buttons he has permission to. To make it easier, the buttons should be named sequentially so that you can make a loop. Ex. Button1, button2, button3, etc. Then you can loop throug the switch board table for that user and make his buttons visible:
SwitchBoard table:
UserID ButtonID
User1 1
User1 3
User2 5
User2 6
Create a recordset on the SwitchBoarad table where the user = the user logged in
While not recordset.eof
me(”Button” & recordset.buttonid).visible = true
recordset.movenext
Wend