Discussion Locked

Delare a workspace in Access 2000

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am working with a book on Access 97 and I am working in Access 2000. I have part of some code I am trying to add and I am recieving an error. My code is as follows:
Private Sub cmdChange_Click

Dim strMsg as string

'This is the line that gives me the error
Dim wks as Workspace

Dim strErr as String

On Error GoTo cmdChange_Click_Err

Set wks = DBEngine (0)

That is the area on my problem. When I try to declare the workspace I donot get Worspace as a choice. How do I declare a Worspce in Access 2000

Dennis

4 replies

by seagull data services

It should work OK unless there's something wrong with you installation. Try

dim wks as dao.workspace 'foce it to look for dao
...
set wks=dbengine(0)
...

This discussion is closed to new replies.