I want the field in a form I'm building to look at a date and number of months, calculate an end date and then compare the end date to the current date. I've managed to build some working code but here's where the problem starts. The form is a continuous form that display loads of records that are associated with a customer, this dynamic field is reproduced for each record. I don't know how to either load the code for each record or loop through every record.
Dim insDate As Date
Dim warr As Double
Dim endDate As Date
If Not installDate.Value = "" Then
insDate = installDate.Value
warr = warranty.Value
endDate = DateAdd(m, warr, insDate)
If endDate > Date Then
Text22.Value = "Yes"
Else
Text22.Value = "No"
End If
End If
I just don't know where to put it or how to loop through a continous form. Thanks for any help. R
Dim insDate As Date
Dim warr As Double
Dim endDate As Date
If Not installDate.Value = "" Then
insDate = installDate.Value
warr = warranty.Value
endDate = DateAdd(m, warr, insDate)
If endDate > Date Then
Text22.Value = "Yes"
Else
Text22.Value = "No"
End If
End If
I just don't know where to put it or how to loop through a continous form. Thanks for any help. R