Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    81

    Angry Unanswered: The Microsoft Jet database engine stopped the process because you and another user ar

    I'm getting an 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 only have one user logged into the database... how then do I get this error? ANd how do I fix it. I'm getting hassled every day and it's finally driven me up the wall.

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    When do you get this error?

  3. #3
    Join Date
    Oct 2003
    Posts
    81
    OK, the situation:

    I have a form. On this form I have a tab control. The tab control has eight separate tabs. Each tab has a subform on it.

    On one particular tab, I have a subform which... oh bugger it, heres the code:

    Option Compare Database

    'This module determines the row source for Appliance_Bowls (Selections).
    'This is done through a select case statement which checks the value selected in the
    'Appliance_Type (Type) selection box and uses the below sql query to determine the row source.

    Private Sub Appliance_Bowls_GotFocus()
    Select Case Appliance_Type
    Case "Sink" 'if sink is selected
    Me.Appliance_Bowls.RowSourceType = "Table/Query"
    Me.Appliance_Bowls.RowSource = "SELECT [Tbl Sinks Bowls Available].Bowl, [tbl Sinks].[Sink ID] FROM [tbl Sinks] INNER JOIN [Tbl Sinks Bowls Available] ON [tbl Sinks].[Sink ID] = [Tbl Sinks Bowls Available].[Sink ID] WHERE ((([tbl Sinks].[Sink ID])=[Forms]![Frm Job Details]![Job Appliances].[Form]![Appliance_Number]));"
    Case "Basin" 'if basin is selected
    Me.Appliance_Bowls.RowSourceType = "Value List"
    Me.Appliance_Bowls.RowSource = "NA"
    Case "Trough" 'if trough is selected
    Me.Appliance_Bowls.RowSourceType = "Table/Query"
    Me.Appliance_Bowls.RowSource = "SELECT [Tbl Troughs Bowls Available].Bowl, [tbl Troughs].[Trough ID] FROM [tbl Troughs] INNER JOIN [Tbl Troughs Bowls Available] ON [tbl Troughs].[Trough ID] = [Tbl Troughs Bowls Available].[Trough ID] WHERE ((([tbl Troughs].[Trough ID])=[Forms]![Frm Job Details]![Job Appliances].[Form]![Appliance_Number]));"
    Case "Rangehood" 'if rangehood is selected
    Me.Appliance_Bowls.RowSourceType = "Value List"
    Me.Appliance_Bowls.RowSource = "No Flue, Top Flue, Rear Flue"
    End Select

    Me.Refresh 'refresh data

    End Sub

    'This is the programming for the Details button.

    Private Sub Appliance_Details_Button_Click()
    On Error GoTo Err_Appliance_Details_Button_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    Select Case Appliance_Type
    Case "Sink"
    stDocName = "sbFrm Appliances Sinks"
    stLinkCriteria = "[Sink ID]= " & Me.Appliance_Number
    Case "Basin"
    stDocName = "sbFrm Appliances Basins"
    stLinkCriteria = "[Basin ID]= " & Me.Appliance_Number
    Case "Trough"
    stDocName = "sbFrm Appliances Troughs"
    stLinkCriteria = "[Trough ID]= " & Me.Appliance_Number
    Case "Rangehood"
    stDocName = "sbFrm Appliances Rangehoods"
    stLinkCriteria = "[Rangehood ID]= " & Me.Appliance_Number
    End Select

    DoCmd.OpenForm stDocName, , , stLinkCriteria 'opens a form from within a form

    Exit_Appliance_Details_Button_Click:
    Exit Sub

    'Error Checking segment

    Err_Appliance_Details_Button_Click:
    If Err.Number = 2494 Then 'no appliance type and number supplied
    MsgBox "Please Enter an Appliance Type and a Number"
    ElseIf Err.Number = 3075 Then 'no appliance number specified
    MsgBox "Please enter an Appliance Number"
    Else
    MsgBox Err.Number & ", " & Err.Description 'catches any other error and prints the number and description
    End If

    Resume Exit_Appliance_Details_Button_Click

    End Sub

    'This module checks the Appliance_Type and changes the Appliance_Bowls (specification)
    'according to the following:

    Private Sub Appliance_Number_AfterUpdate()

    If Me.Appliance_Type = "Basin" Then 'if basin is selected
    Me.Appliance_Bowls = "NA" 'set selection to "NA"
    ElseIf Me.Appliance_Type = "Trough" Then 'if trough is selected
    Me.Appliance_Bowls = "Centre" 'set selection to "Centre"
    Else
    Me.Appliance_Bowls = Null 'otherwise set selection to null and uses the Appliance_Number_GotFocus() module
    End If

    Me.Appliance_Colour = Null 'set colour to default

    Me.Appliance_Tap_Holes = Null 'set tap holes to default

    ' Summon an inputbox to grab a value from the user

    ' Check if the appliance number is equal to the "as per addenda" number
    If (Me.Appliance_Type_Req.Value = "Sink" And Me.Appliance_Number_Req.Value = 223) Then
    UInput
    ElseIf (Me.Appliance_Type_Req.Value = "Basin" And Me.Appliance_Number_Req.Value = 47) Then
    UInput
    ElseIf (Me.Appliance_Type_Req.Value = "Rangehood" And Me.Appliance_Number_Req.Value = 22) Then
    UInput
    ElseIf (Me.Appliance_Type_Req.Value = "Trough" And Me.Appliance_Number_Req.Value = 13) Then
    UInput
    End If
    End Sub

    Function UInput()

    ' Check if the appliance number is equal to the "as per addenda" number
    Dim Strg As String, a$ ' standard declaration
    Strg = InputBox("Please enter the addenda item description:", "Addenda Item Description", Nz(Me.Addenda_Description, "Blank"))
    If Strg = "" Then ' if the user enters no data then
    a$ = "The addenda item description is required. Please enter the addenda item description"
    Else ' if a value is entered then
    a$ = "The addenda item description of:" & vbNewLine & vbNewLine & Strg & " has been entered"
    End If
    MsgBox a$ ' feedback to allow the user to see that they have successfully entered in the data

    ' Add the value entered into the addenda_description text box
    Me.Addenda_Description = Strg

    End Function

    'This module determines the row source for Appliance_Number (Number).
    'This is done through a select case statement which checks the value selected in the
    'Appliance_Type (Type) selection box and uses the below sql query to determine the row source.

    Private Sub Appliance_Number_GotFocus()

    Select Case Appliance_Type
    Case "Sink" 'if sink is selected
    Me.Appliance_Number.RowSource = "SELECT [tbl Sinks].[Sink ID], [tbl Sinks].[Sink Type], [tbl Sinks].[Sink Model], [tbl Sinks].[Sink Details] FROM [tbl Sinks] WHERE [tbl Sinks].[Active] = Yes;"
    Case "Basin" 'if basin is selected
    Me.Appliance_Number.RowSource = "SELECT [tbl Basins].[Basin ID], [tbl Basins].[Basin Type], [tbl Basins].[Basin Model], [tbl Basins].[Basin Number] FROM [tbl Basins] WHERE [tbl Basins].[Active] = Yes;"
    Case "Trough" 'if trough is selected
    Me.Appliance_Number.RowSource = "SELECT [tbl Troughs].[Trough ID], [tbl Troughs].[Trough Type], [tbl Troughs].[Trough Model], [tbl Troughs].[Trough Details] FROM [tbl Troughs] WHERE [tbl Troughs].[Active] = Yes;"
    Case "Rangehood" 'if rangehood is selected
    Me.Appliance_Number.RowSource = "SELECT [tbl Rangehoods].[Rangehood ID], [tbl Rangehoods].[Rangehood Manufacturer], [tbl Rangehoods].[Rangehood Model], [tbl Rangehoods].[Rangehood Width] FROM [tbl Rangehoods] WHERE [tbl Rangehoods].[Active] = Yes;"
    End Select

    Me.Refresh 'refresh data


    End Sub

    'This module checks the Appliance_Type and changes the Appliance_Bowls (specification)
    'according to the following:

    Private Sub Appliance_Type_AfterUpdate()

    If Me.Appliance_Type = "Basin" Then 'if basin is selected
    Me.Appliance_Bowls = "NA" 'set selection to "NA"
    ElseIf Me.Appliance_Type = "Trough" Then 'if trough is selected
    Me.Appliance_Bowls = "Centre" 'set selection to "Centre"
    Else
    Me.Appliance_Bowls = Null 'otherwise set selection to null and uses the Appliance_Number_GotFocus() module
    End If

    Me.Appliance_Number = Null 'removes the appliance number to ensure no mismatched data entries
    Me.Appliance_Colour = Null 'set colour to default
    Me.Appliance_Tap_Holes = Null 'set tap holes to default

    DoCmd.RunCommand acCmdSaveRecord 'saves the current record

    End Sub

    'This module ensures that the sinks group (who enter the appliances received) cannot change the
    'appliances required. This prevents users from changing details to ensure a green light.

    Private Sub Form_Load()
    If GroupMember("sinks") Then
    Me.AllowEdits = False
    Me.AllowAdditions = False
    Me.AllowDeletions = False
    End If
    End Sub

    Private Sub Command21_Click()
    UInput
    End Sub

    Additional Information:

    1. The form works perfectly on any standalone machine. The main database is operating through terminal services. When someone logs in under terminal services and tries to move away from the Type combo box then all fields are replaced by error and the message box saying "The Microsoft Jet database engine..." comes up.

    2. There were originally bit fields, but I changed them to long integer and gave them all the numbers a default value. This had no effect.


    Any help on this matter would be greatly appreciated.

  4. #4
    Join Date
    Oct 2003
    Posts
    81
    Anyone????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •