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

Error 3029

Status
Not open for further replies.

HomeALone

Instructor
Jul 20, 2001
110
US
I got this sample function from Microsoft knowledge Base Article - 210331


I did exactly that and I got error 3029 which returns its custom message "The account used to create the workspace does not exist"

My question, how do I correct this error?

the function:

Function CurrentUserInGroup(GroupName As String)
'****************************************************************
' Purpose: Determines if the current user belongs to the specified
' group.
' Accepts: The name of a group.
' Returns: True if the current user is a member of the specified
' group, False if the current user is not a member of
' the group.
' Assumes: The existence of a user called Developer in the Admins
' group, with no password.
'****************************************************************

On Error GoTo err_CurrentUserInGroup

Dim MyWorkSpace As Workspace, i As Integer
Dim MyGroup As Group, MyUser As User

' Create a new workspace as a member of the Admins group.
Set MyWorkSpace = DBEngine.CreateWorkspace("SPECIAL", "Developer", "")

Set MyGroup = MyWorkSpace.Groups(GroupName)
Set MyUser = MyWorkSpace.Users(CurrentUser())
For i = 0 To MyGroup.Users.Count - 1
If MyGroup.Users(i).Name = MyUser.Name Then
CurrentUserInGroup = True
Exit Function
End If
Next i

CurrentUserInGroup = False
MyWorkSpace.Close
Exit Function

err_CurrentUserInGroup:
If Err = 3265 Then
MsgBox UCase(GroupName) & " isn't a valid group name", 16, "Error"
CurrentUserInGroup = False
ElseIf Err = 3029 Then
MsgBox "The account used to create the workspace does not exist"
Else: MsgBox Error(Err)
End If

MyWorkSpace.Close
Exit Function

End Function
 
Hi,

Please try DAO.Workspace instead of Workspace and please don't forget to provide Microsoft DAO 3.6 library reference in VBE. Sometimes it will solve problem


Regards,

RADM
 


I tried dimming DAO.Workspaces before, I even narrowed it down to just have Microsoft DAO 3.6 library in the reference, and ran it in Northwind, I still got that error!

What else should I try? or where else should I look? Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top