• Code SOMETIMES throwing a 3020 error: Update or CancelUpdate without AddNew or E

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Code SOMETIMES throwing a 3020 error: Update or CancelUpdate without AddNew or E

    Author
    Topic
    #2442628

    I have a subform on a tab control that has textboxes and a button to calculate values and put the values into the textboxes.

    Function CalcTotalHours() As String
    Dim rst As DAO.Recordset
    Dim strSQL As String
    Dim i As Integer
    Dim j As Integer
    Dim dblHours As Double
    Dim strControl As String

    txtFAB = 0
    txtTurn = 0
    etc.

    On occasions, it errors on the lines trying to write to the textboxes with the 3020 error.

    This code has worked fine for a few years but recently has been doing this. It is a totally random event. You can move to another form and it will work correctly, move again and it won’t. Reload the DB and it may or may not work, so I don’t think its coding.

    Can anyone think of anything that might be causing it? Its driving my users nuts and me crazy trying to work out why and how to fix it.

    Reply To: Code SOMETIMES throwing a 3020 error: Update or CancelUpdate without AddNew or E

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: