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

3358 Cannot open workgroup information file

Status
Not open for further replies.

lameid

Programmer
Jan 31, 2001
4,212
US
I was getting this error when trying to set the username property of a DAO.document.

I had a similar problem crop up when trying to step through the groups collection of the workspace object.

In both cases I set a second database equal to the opendatabase method of a workspace.

To cure this problem, I found I had to do something that accessed the workgroup after opening the workspace and before opening the second database like getting the count of the groups.

Code:
Sub ContainerPermissions(strTargetDB)
    Dim WS As DAO.Workspace
    Dim grp As DAO.Group
    Dim db As DAO.Database
    Dim dbLocal As DAO.Database
    Dim con As DAO.Container
    Dim Doc As DAO.Document
    Dim RSObjects As DAO.Recordset
    Dim RSObjectPermission As DAO.Recordset
    Dim lngObjID As Long
    
    Set dbLocal = CurrentDb
    Set WS = Workspaces("#Default Workspace#")
    Debug.Print WS.Groups.Count 'this made it work
    Set db = WS.OpenDatabase(strTargetDB)
    'code that messes with security below

I hope this saves someone the trouble it caused me.

Also worth mentioning is another post I saw out on the internet recommending going to Tools, Security and Workgroup Administrator and creating a workgroup if none exists. This was not the purpose of this post but for the sake of completness I included it.

Keywords for search engines:
Error 3358 Cannot open workgroup information file
Access MS Microsoft 2003
DAO Documents Document Username Workgroup Container Containers Security
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top