I want to check if a condition is true for a particular field in each record of the subform and if it is true update another field in the same record. I want this to happen for every record in the subform but this should be triggered in the current event of the form containing the subform. You are all right, and I actually tried to do that but it didn't work.
This was the code I wrote to accomplish this:
Private Sub Form_Current()
Dim i As Recordset
For Each i In sbFormInvoiceDetails.Form.Recordset
With i
If (Date > sbFormInvoiceDetails.Form!DueBack) Then
sbFormInvoiceDetails.Form!ReturnedStatus = "Overdue"
End If
End With
Next
End Sub
When I execute my main form I got a 3152 error (Operation is not supported for this type of object.)