|
-
Jun 22nd, 2000, 10:22 AM
#1
Thread Starter
Junior Member
Set UserDB = DBEngine.Workspaces(1).OpenDatabase(App.Path + "Users.mdb")
In the above code, I get the error "Item not found in collection." Now, I have used this same code with different databases several times. I have done the exact same with this as I have with the others. And ideas?
-
Jun 22nd, 2000, 10:30 AM
#2
Lively Member
I would normally make a myWS variable containing the dbengine, then open the database separately.
Also, app.path may not contain a backslash at the end.
i.e.
Code:
dim myWs as Workspace
dim myDb as Database
Set myWs=dbengine.workspaces(0)
Set myDB=myWs.OpenDatabase(app.path & "\Users.mdb")
Try that.
-
Jun 22nd, 2000, 10:35 AM
#3
Thread Starter
Junior Member
Ack!
It was my workspaces(1) instead of 0. How do I make a new workspace?
-
Jun 22nd, 2000, 11:08 AM
#4
Lively Member
Syntax:
Set workspace = CreateWorkspace(name, user, password, type)
Example:
Code:
Dim wrkODBC as Workspace
Set wrkODBC = CreateWorkspace("ODBCWorkspace", "admin", _
"", dbUseODBC)
Workspaces.Append wrkODBC
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|