Solved

Error on DBEngine.Workspaces(0)

Posted on 2002-05-23
3
298 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
  • 2
3 Comments
 
LVL 54

Expert Comment

by:nico5038
Comment Utility
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
Comment Utility

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
Comment Utility
Per recommendation, points NOT refunded and question closed.

Netminder
CS Moderator
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

743 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now