Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Access (https://www.askmehelpdesk.com/forumdisplay.php?f=441)
-   -   Error: The Microsoft Jet database engine stopped the process. (https://www.askmehelpdesk.com/showthread.php?t=134514)

  • Sep 27, 2007, 11:31 AM
    mrsgwen90
    Error: The Microsoft Jet database engine stopped the process.
    I am using Access as the front end and using a SQL database and some VB 6.0 code.

    I have a form that is using a Query that asks the user for a "VehicleID" and a "Date".
    Once the record is retrieved the user can add additional info or edit info and then there's an Update Record command button. The values are writing to a db table in SQL. Once the user hits the update button the error message "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 the only user that is using this right now because it is still in the testing stage. So I don't understand why I'm getting this error. Could it be in my code? My code is below:

    Private Sub cmdAddRec_Click()
    On Error Go to 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

    Please give any advice that you can.
    Thank you:confused:
  • Sep 27, 2007, 12:30 PM
    ScottGem
    Do you know what line is causing the error? Also, I don't see why you are using ADO. You coould just as easily time and people stamp the record using controls on the form.

  • All times are GMT -7. The time now is 10:03 PM.