?
Solved

Error on DBEngine.Workspaces(0)

Posted on 2002-05-23
3
Medium Priority
?
313 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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