Link to home
Start Free TrialLog in
Avatar of Marilync1266
Marilync1266

asked on

Microsoft Access Write Conflict

I have a combo box with an "after update" event that will run sql to update the table tied to the form with some data.  This routine is called by other events and it works fine, but when I access it through the combo box I receive a "write conflict error" and it does not actually update the record until I select another record on the form


Private Sub Contract_Type_AfterUpdate()
DoCmd.SetWarnings False
   
Me.Term = Forms!frm_Opportunity_Quote!Contract_Type.Column(1)
Me.Contract_Type_New = Forms!frm_Opportunity_Quote!Contract_Type.Column(0)
Call Calculate_Finance(Me.txtQuoteNo, True)
Me.fsub_Disposables_Selected.Requery
Me.Form.Requery

End Sub

From the Calculate_Finance routine
--- Monthly_Pmt does not update until I select a different record.  But, the Total_Quote_Amount does update.

    strFinance = ("Update tbl_Quotes " & _
        "Set tbl_Quotes.Monthly_Pmt = " & intPmt & ", tbl_Quotes.Total_Quote_Amount = " & _
            intTotal & " Where tbl_Quotes.QuoteNo = '" & strQuoteNo & "';")
    DoCmd.RunSQL strFinance
Write-Conflict.jpg
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial