M
MikeG0930
I am trying to open a form with the following code, and getting an
error message "Run-time error '-2147467259(80004005 the database has
been placed in a state by user "Admin" on machine "" that prevents it
from being opened or locked."
Here is the code:
Option Compare Database
Private strSQL As String
Private cnnHIREPay As New ADODB.Connection
Private rstHIREPay As New ADODB.Recordset
Private Sub Form_Load()
With cnnHIREPay
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Open CurrentProject.Path & "\HIRE Consumer Payroll.mdb",
"Admin"
End With
strSQL = "SELECT ConsumerName, CalDay, EEP1, DateWorked FROM
qryEEP_Cal"
With rstHIREPay
Set .ActiveConnection = cnnHIREPay
.CursorType = adOpenKeyset
.CursorLocation = adUseClient
.LockType = adLockOptimistic
.Open strSQL
End With
Set Me.Recordset = rstHIREPay
End Sub
Can someone help me please?
Thanks
Mike
error message "Run-time error '-2147467259(80004005 the database has
been placed in a state by user "Admin" on machine "" that prevents it
from being opened or locked."
Here is the code:
Option Compare Database
Private strSQL As String
Private cnnHIREPay As New ADODB.Connection
Private rstHIREPay As New ADODB.Recordset
Private Sub Form_Load()
With cnnHIREPay
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Open CurrentProject.Path & "\HIRE Consumer Payroll.mdb",
"Admin"
End With
strSQL = "SELECT ConsumerName, CalDay, EEP1, DateWorked FROM
qryEEP_Cal"
With rstHIREPay
Set .ActiveConnection = cnnHIREPay
.CursorType = adOpenKeyset
.CursorLocation = adUseClient
.LockType = adLockOptimistic
.Open strSQL
End With
Set Me.Recordset = rstHIREPay
End Sub
Can someone help me please?
Thanks
Mike