Thanks. Took me a while to try this.
When I run the append query, I get the error:
If I ignore the error, nothing happens.
At the moment this is what handles the saving:
Code:
Option Compare Database
Option Explicit
Private mSaved As Boolean
Private Sub Form_Current()
mSaved = False
End Sub
Private Sub Form_BeforeUpdate(Cancel As Integer)
If mSaved = False Then
Cancel = True
Me.Undo
Cancel = False
End If
If Me.NewRecord Then
Me.[No] = Nz(DMax("[No]", "[tbl2019]") + 1)
End If
End Sub
Private Sub btnSaveRecord_Click()
mSaved = True
Me.Requery
Me.frmDataView.Requery
End Sub
This saves the record, clears the data entry form and refreshes the view of the "Data View" subform.
Unfortunately, I can't share the database
Thank you again for your time.