Solved

Error on DBEngine.Workspaces(0)

Posted on 2002-05-23
3
299 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HasData 9 37
Prevent users from stopping queries to import data in Access 5 31
DSum for Access 6 47
running an update statement after a msgbox (MS Access) 3 31
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

867 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

22 Experts available now in Live!

Get 1:1 Help Now