I have the following code to add a record to a table after a change to a record on a form;
I get the error on the .Close line.
This just started today after months of using this procedure.
Tried closing and restarting the database, using different front ends.
The error goes away if I delete the .Close line, but I'm thinking this will cause other issues.
Code:
Private Sub Note_BeforeUpdate(Cancel As Integer)
Dim tblSubmittalLog As DAO.Recordset
Dim ddd As Date
Dim strWhat As String
ddd = Date
If Me.NewRecord Then
strWhat = "Added: " & Me.Note
Else
strWhat = "Edited the note from '" & Me.Note.OldValue & "' to '" & Me.Note & "'"
End If
Set tblSubmittalLog = CurrentDb.OpenRecordset("SELECT * From[tblSubmittalLog]")
With tblSubmittalLog
.AddNew
![ID] = Me.SerialNumber
'Debug.Print itgID
![Who] = Me.Parent!Reviewer
![DateAction] = ddd
![What] = strWhat
.Update
.Close
End With
Set tblSubmittalLog = Nothing
Me.Parent!frmSubmittalActionLog.Form.Requery
End Sub
This just started today after months of using this procedure.
Tried closing and restarting the database, using different front ends.
The error goes away if I delete the .Close line, but I'm thinking this will cause other issues.