Microsoft KB Archive/181961

= ACC97: Run-Time Error '3028' Using CreateWorkspace Method with a Password Argument =

Article ID: 181961

Article Last Modified on 1/22/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q181961



Advanced: Requires expert coding, interoperability, and multiuser skills.



SYMPTOMS
If you use the CreateWorkspace method without specifying the DBEngine object, you may receive the following error message when you use the optional Password argument:

Run-time error '3028':

Can't start your application. The workgroup information file is missing or opened exclusively by another user.

If you choose not to specify a password, the same syntax does not cause an error.



RESOLUTION
When you create a new Workspace object in which you specify a password, use the following syntax:

  Set Workspace = DBEngine.CreateWorkspace(name, user, password, type)



STATUS
Microsoft has confirmed this to be a problem in the versions of Microsoft Access listed at the beginning of this article.



Steps to Reproduce Behavior
 Open the sample database Northwind.mdb.  Create a new module and type or paste the following code:

Public Sub TestWorkspace

Dim wrkAdmin As Workspace Dim dbs As Database

'Create a new workspace and assign it to the database administrator. Set wrkAdmin = CreateWorkspace("AdminWorkspace", "Admin", "test", _       dbUseJet)

'Be sure to change the path in this next line to match your path to      'Northwind.mdb on your computer. Set dbs = wrkAdmin.OpenDatabase("C:\Northwind.mdb", False)

'Close the session. wrkAdmin.Close

End Sub  On the Debug menu, click Compile And Save All Modules. Save the module as modTestWorkspace. Close the module. On the Tools menu click Security, and then click User And Group Accounts. Click the Change Logon Password tab and change your password to test

NOTE: This article assumes that you have logged into the database as the "Admin" user. If the User Name field within the Change Logon Password dialog reads anything other than Admin, close the database and log on as Admin before continuing.</li> Close the database, and then close Microsoft Access 97.</li> Run Microsoft Access 97, and log on as the "Admin" user with a password of test .</li> To test this procedure, type the following line in the Debug window, and then press ENTER.

Call TestWorkspace

Note that you receive the error message mentioned in the "Symptoms" section.</li></ol>

<div class="references_section">