Error: The Microsoft Jet database engine stopped the process becau

M

mrsgwen

I am getting the error: The Microsoft Jet database engine stopped the process
because you and another user are attempting to change the same data at the
same time.

I am using Access as a frontend and SQL database and also a little VB 6.0
code.
It gives me the error when I am trying to update a record on a form.
 
J

John W. Vinson

I am getting the error: The Microsoft Jet database engine stopped the process
because you and another user are attempting to change the same data at the
same time.

I am using Access as a frontend and SQL database and also a little VB 6.0
code.
It gives me the error when I am trying to update a record on a form.

This error often means that you have two objects (say two forms, or a form and
a subform, or a form and a query, or a form and some VBA code, or...) both
attempting to access the same record at the same time. Is there anything else
running within the database at the time?

John W. Vinson [MVP]
 
M

mrsgwen

I am running a form and a query with some VB code. My code is below, maybe
something is wrong with my code.

Private Sub cmdAddRec_Click()
On Error GoTo Err_cmdAddRec_Click


Dim rstTrans As New ADODB.Recordset
Dim fld As ADODB.Field
Dim strField As String
Dim Msg, Response


Msg = "Do you want to update another record?"

Sqlstmt = "SELECT * FROM dbo_tbl_HR_Shuttle WHERE VehicleID = " &
Form_Daily_Vehicle_Tic_Sheet_Data_Form!VehicleID

rstTrans.Open Sqlstmt, CurrentProject.Connection, adOpenKeyset,
adLockOptimistic

rstTrans!DateModified = Now()
rstTrans!UpdateUser = gUser

Me.Refresh

rstTrans.Update

Response = MsgBox(Msg, vbYesNo)
If Response = vbYes Then
'MsgBox ("result is yes")
DoCmd.Close
DoCmd.OpenForm "Daily_Vehicle_Tic_Sheet_Data_Form"
Else
DoCmd.Close
End If
rstTrans.Close
Set rstTrans = Nothing
Exit_cmdAddRec_Click:
Exit Sub

Err_cmdAddRec_Click:
MsgBox Err.Description
Resume Exit_cmdAddRec_Click

End Sub
 

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