R
Rudi Groenewald
Hi all,
I am trying to make my own switchboard which will automatically update from
the administrators side at the server.
A bit of background:
My database application consists out of several "modules", to define this
modules, I use sql server groups. eg: Lets say I've got a module called
"oil consumption" that gives all the tables and view access which is needed
to capture and retrieve oil consumption.
What I want to try and do is, have an list box or something similar, which
lists to me all the modules the user has access to, and when the user double
clicks on a module, that opens the main form for that module. This will
allow a dynamic, "switchboard" which is controlled from the sql server
administrator as it will only show the modules (groups) to open which the
user has access to. To achieve this I have allready conquired how to show a
user which grroups he has got access to by using the following syntax:
SELECT TOP 100 PERCENT sysusers_1.name AS RoleAccess, dbo.sysusers.uid
AS UserID, dbo.sysusers.name AS Login
FROM dbo.sysusers INNER JOIN
dbo.sysmembers ON dbo.sysusers.uid =
dbo.sysmembers.memberuid INNER JOIN
dbo.sysusers sysusers_1 ON dbo.sysmembers.groupuid =
sysusers_1.uid
WHERE (dbo.sysusers.name = @currentuser)
ORDER BY sysusers_1.name
What I need to do next is have a table with all the Main form names and
assign each form a groupuid for eg:
Module: GroupID: Form:
Energy Consumption 16410
Tbl_EnergyConsumption
When I have a table with that information, I can link the groupid with the
users id, and this will show then which users have access to which forms.
My Problem is, lets say I show these values in a list box, how could I let
the appropriate form open when I have the form name?
Help and suggestions please...
Thanks
Rudi Groenewald
I am trying to make my own switchboard which will automatically update from
the administrators side at the server.
A bit of background:
My database application consists out of several "modules", to define this
modules, I use sql server groups. eg: Lets say I've got a module called
"oil consumption" that gives all the tables and view access which is needed
to capture and retrieve oil consumption.
What I want to try and do is, have an list box or something similar, which
lists to me all the modules the user has access to, and when the user double
clicks on a module, that opens the main form for that module. This will
allow a dynamic, "switchboard" which is controlled from the sql server
administrator as it will only show the modules (groups) to open which the
user has access to. To achieve this I have allready conquired how to show a
user which grroups he has got access to by using the following syntax:
SELECT TOP 100 PERCENT sysusers_1.name AS RoleAccess, dbo.sysusers.uid
AS UserID, dbo.sysusers.name AS Login
FROM dbo.sysusers INNER JOIN
dbo.sysmembers ON dbo.sysusers.uid =
dbo.sysmembers.memberuid INNER JOIN
dbo.sysusers sysusers_1 ON dbo.sysmembers.groupuid =
sysusers_1.uid
WHERE (dbo.sysusers.name = @currentuser)
ORDER BY sysusers_1.name
What I need to do next is have a table with all the Main form names and
assign each form a groupuid for eg:
Module: GroupID: Form:
Energy Consumption 16410
Tbl_EnergyConsumption
When I have a table with that information, I can link the groupid with the
users id, and this will show then which users have access to which forms.
My Problem is, lets say I show these values in a list box, how could I let
the appropriate form open when I have the form name?
Help and suggestions please...
Thanks
Rudi Groenewald