Cannot debug Access

A

andywawa

Hi,
when I try to change something on a form and then save it, I got this
message: Runtime
Error '-2147467259 (80004005). The database has been placed in a state by
user Admin on machine xxxx that prevents it from being opened or locked.

The debuger comes to the line: "cn.Open CurrentProject.Connection" and
halts. To compile it doesn't help, only to shrink the database (or reopen
it). I'm using Access 2002, SP 3. The Form starts with it:

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
cn.CursorLocation = adUseClient
Set rs = New ADODB.Recordset
Dim i, j, anzahl As Integer
Dim sql As String
i = 0
j = 0
anzahl = 0

cn.Open CurrentProject.Connection

What's the problem?

Thanks, Andreas
 
P

punjab_tom

try this dog

cn.Open CurrentProject.Connection.connectionString

I really truly HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top