Results 1 to 4 of 4

Thread: MDW issue

  1. #1
    Join Date
    Jul 2002

    Post Unanswered: MDW issue

    can anyone help please... there a way to force access to use a specific SYSTEM.MDW file
    without the shortcut /wrkgrp option. (i.e. preventing someone opening *.mdb file fom within say win explorer prior to attaching to appropriate *.MDW file)

    Thank you in advance


  2. #2
    Join Date
    Jun 2002
    I don't know, for now, how to force access to use a specific .mdw file.
    But take a look at the following example:

    Function SetPermissions(strName As String, strPID As String, _
    strPassword As String) As Boolean
    Dim dbs As Database, ctrTables As Container
    Dim wspDefault As Workspace, usrNew As User

    On Error GoTo ErrorSetPermissions
    ' Return reference to default workspace.
    Set wspDefault = DBEngine.Workspaces(0)
    ' Create User object, specifying name, PID, and password.
    Set usrNew = wspDefault.CreateUser(strName, strPID, strPassword)
    ' Append to Users collection of default workspace.

    wspDefault.Users.Append usrNew
    ' Return reference to current database.
    Set dbs = CurrentDb
    ' Return reference to Tables container.
    Set ctrTables = dbs.Containers!Tables
    ctrTables.UserName = usrNew.Name
    ' Set new user's permissions for tables.
    ctrTables.Permissions = dbSecInsertData _
    And dbSecReplaceData And dbSecDeleteData
    SetPermissions = True

    Set dbs = Nothing
    Exit Function


    MsgBox Err & ": " & Err.Description
    SetPermissions = False
    Resume ExitSetPermissions
    End Function

  3. #3
    Join Date
    Jun 2002
    Mpls/St.Paul area
    On a user's PC, you could replace the standard system.mdw file found in c:\windows\system with your system.mdw file. This would require that every time they opened access (for any database) they would have to give the same username and password.

    You could also change the registry (regedit) so that access looked for your system.mdw file instead of the default file in c:\windows\system.
    Same result as above.

    The info below comes from microsoft.;Q241230<br />
    Access 97:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\8.0\A ccess\Jet\3.5\Engines

    Name = SystemDB
    Data = <path of Windows\System folder>\System.mdw
    Access 2000:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\9.0\A ccess\Jet\4.0\Engines

    Name = SystemDB
    Data = <path you defined during Setup>\System.mdw
    Last edited by jpshay; 07-22-02 at 08:39.
    This is the day the Lord has made, I will rejoice and be glad in it.

  4. #4
    Join Date
    Jul 2002
    Gothenburg, Sweden
    A convenient way is to use the application wrkgadm.exe, installed with Access. It will update the registry for you. Also, it's a good practice not to name your own mdw-files as system.mdw. In some cases you'll need to use the standard system.mdw, such as if you want to convert an mdb to a later version of Access, and it may cause inconvenience if you mix up custom created mdw-files with the standard one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts