T
tessa.wier
Hi
I have a password secure jet database shared across a small network.
I am using the following code to determine what group the currentuser
belongs to, in order to run form permissions, and the code works on
every computer but one. It is an Access 2000 database and the
computer with the problem runs Access 2002 (Note: other Access 2002
computers exist and are fine with the code). I have searched for an
answer all over the net. My "References" are fine (even turned off
the ActiveX Data Obejects 2.1 Library as using DA03.6) my database is
not corrupt (on the problem machine I imported everything into a blank
database and tried to run it with no luck). I am lost please help me.
Function IsUserInGroup(strGroup as String, strUser as String) as
Integer
Dim ws as Workspace
Dim grp as Group
Dim strUserName as String
Set ws = DBEngine.CreateWorkspace("Test","Developer","")
Set grp = ws.Groups(strGroup) 'here it states Error 3265: Item not
found in this collection (test Item = "Admins")
On Error Resume Next
StrUsername = grp.Users(struser).Name
IsUserInGroup= (Err=0)
Set ws = Nothign
Set grp = Nothing
End Fucntion
I have a password secure jet database shared across a small network.
I am using the following code to determine what group the currentuser
belongs to, in order to run form permissions, and the code works on
every computer but one. It is an Access 2000 database and the
computer with the problem runs Access 2002 (Note: other Access 2002
computers exist and are fine with the code). I have searched for an
answer all over the net. My "References" are fine (even turned off
the ActiveX Data Obejects 2.1 Library as using DA03.6) my database is
not corrupt (on the problem machine I imported everything into a blank
database and tried to run it with no luck). I am lost please help me.
Function IsUserInGroup(strGroup as String, strUser as String) as
Integer
Dim ws as Workspace
Dim grp as Group
Dim strUserName as String
Set ws = DBEngine.CreateWorkspace("Test","Developer","")
Set grp = ws.Groups(strGroup) 'here it states Error 3265: Item not
found in this collection (test Item = "Admins")
On Error Resume Next
StrUsername = grp.Users(struser).Name
IsUserInGroup= (Err=0)
Set ws = Nothign
Set grp = Nothing
End Fucntion