Solved

Error on DBEngine.Workspaces(0)

Posted on 2002-05-23
3
305 Views
Last Modified: 2008-03-17
I have an Access database that is used locally by about 150 different people, on different computers and versions of windows and office.

I need to create an access database. In order to do this, I use the following code:

Dim wsp As Workspace
Dim dbs As Database
Set wsp = DBEngine.Workspaces(0)
Set dbs = wsp.CreateDatabase(Application.CurrentProject.Path & "\Newdb.mdb", dbLangGeneral & ";pwd=xxxx", dbEncrypt)

On a very small number of machines, I am getting an error, exactly on the line

Set wsp = DBEngine.Workspaces(0)

You can't debug a Set statement, but I know by inserting MsgBox statements before and after the statement. The error occurs exactly on that line.

I basically just get a "Halt" window. No interesting information in the error message.

The only constant is that the people with this error have Win2K and OfficeXP, although there are many users with this same configuration that have no problems.
0
Comment
Question by:dfohr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 54

Expert Comment

by:nico5038
ID: 7030759
Did you check the references on those machines?
Just go into VBA (e.g. by opening a module) and select Tools/References.
The library list shouldn't contain a reference name starting with MISSING.
If found, uncheck and (e.g. incase of DAO) replace the library with the same name and another version.
However unchecking is often enough.

Nic;o)
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7226623

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7245630
Per recommendation, points NOT refunded and question closed.

Netminder
CS Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question