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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ehllo everyone, is there an access

Status
Not open for further replies.

KarloZ

Programmer
Dec 15, 2001
65
CA
ehllo everyone, is there an access function or a code to get the group level of a specific user. i want to use it for security puroposes. you guys might have an idea.
e.g.

username: Karloz
Grp Level: Admin ...?


thanks a t!

 
Karlo,
For maximum flexibility and ease of use (ie, not having to write code), you should just use the below sql, put it into a query and save it:

PARAMETERS UserName Text;
SELECT DISTINCT MSysAccounts_1.Name
FROM (MSysAccounts INNER JOIN MSysGroups ON MSysAccounts.SID = MSysGroups.UserSID) INNER JOIN MSysAccounts AS MSysAccounts_1 ON MSysGroups.GroupSID = MSysAccounts_1.SID
WHERE (((MSysAccounts.Name)=[UserName]) AND ((MSysAccounts.FGroup)=0) AND ((MSysAccounts_1.FGroup)<>0));

BUT FIRST...you need to link to MSysAccounts and MSysGroups, simply go to the Tools|Options tabl and Check the 'Show' box System Objects. Then Link these tables from your .mdw file, usually it's C:\Windows\System\System.mdw.
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top