In the attached mdb, is there a way to avoid the RecordSource of the subform being incremented by one day every time you open the main Dezzo form?
Try opening and closing the Dezzo form a few times; you'll see records being added to the g1dez and g2dez tables.
I'm using the following code in the On Current procedure of the subform to remove the record that's been added to the subform RecordSource
Dim cmd1 As ADODB.Command
Set cmd1 = New ADODB.Command
With cmd1
.ActiveConnection = CurrentProject.Connection
.CommandText = "DELETE FROM g2dez" & _
" WHERE giorno = #" & _
Format(Me.Parent.Form.CGior, "mm/dd/yyyy") & "#"
.CommandType = adCmdText
.Execute
End With
Set cmd1 = Nothing
but why then does the RecordSource still retain that record?