I have a form with a date field called Date_Entered. This fills in automatically with the date the record was created.
I've also got a sub form for Visits made which links to the main form by a customer ID. The table behind this has Customer_ID and Visit_Date as fields.
Each time a visit is made, the user fills the date in the next row on the subform.
I also have three other text boxes on my main form. The first is First_Visit_Due which is calculated as Date_Entered + 2 weeks.
The second text box is Second_Visit_Due which takes the first visit date from the subform and adds two weeks to it. I've done this with Min() to get the earliest date related to that record.
The third text box is where I have my problem. This is Third_Visit_Due and I want this one to take the second earliest date in the subform and add two weeks to that but I don't know how to refer to that record. I can't use Max() because there may be more visits taking place afterwards.
Can anyone help?
I've also got a sub form for Visits made which links to the main form by a customer ID. The table behind this has Customer_ID and Visit_Date as fields.
Each time a visit is made, the user fills the date in the next row on the subform.
I also have three other text boxes on my main form. The first is First_Visit_Due which is calculated as Date_Entered + 2 weeks.
The second text box is Second_Visit_Due which takes the first visit date from the subform and adds two weeks to it. I've done this with Min() to get the earliest date related to that record.
The third text box is where I have my problem. This is Third_Visit_Due and I want this one to take the second earliest date in the subform and add two weeks to that but I don't know how to refer to that record. I can't use Max() because there may be more visits taking place afterwards.
Can anyone help?