Troubleshooting time.....
What is Forms!Cort![txtFecha] when the code executes?
Is the SQL string properly formed?
Code:
Private Sub cmdFiltrarpordia_Click()
Dim SQL As String
SQL = "SELECT TablaTemporal.Contacto, TablaTemporal.Total, TablaTemporal.Anticipo, TablaTemporal.Id, TablaTemporal.Nombre, TablaTemporal.Id_dia, TablaTemporal.Resta, TablaTemporal.Creado " _
& "FROM TablaTemporal " _
& "Where [Creado] = #" & Me.txtFecha & "# " _
& "ORDER BY Id_dia ASC"
'----debugging----------------------------------------
Debug.Print SQL
MsgBox "the value for txtFecha is " & Forms!Cort![txtFecha]
'----debugging----------------------------------------
Me.txtTot = DSum("[Total]", "[TablaTemporal]", "Creado = #" & Forms!Cort![txtFecha] & "# ")
Me.SbfrCorte.Form.RecordSource = SQL
End Sub
Set a breakpoint at this line
Me.txtTot = DSum("[Total]", "[TablaTemporal]", "Creado = #" & Forms!Cort![txtFecha] & "# ")
so you can see what is happening