Grabbing Highest Value in Subform | Next Scheduled Maintenance

  • Thread starter Thread starter JK
  • Start date Start date
J

JK

I have a subform that is used to schedule and maintain maintenance records on
company assets. The following fields are included in the subform (MaintDate,
MaintDesc, Technician, Cost.)

On the main form, I have a field called "Next Scheduled Maintenance." I
would like to somehow link this field to the Maintenance Subform (MaintDate)
and always display/store the highest value in the Subform. I hope this makes
sense.
 
JK said:
I have a subform that is used to schedule and maintain maintenance records on
company assets. The following fields are included in the subform (MaintDate,
MaintDesc, Technician, Cost.)

On the main form, I have a field called "Next Scheduled Maintenance." I
would like to somehow link this field to the Maintenance Subform (MaintDate)
and always display/store the highest value in the Subform. I hope this makes
sense.


The subform needs to calculate it own latest date. This can
be done in the subform's header or footer section using a
text box (named txtLatest) with an expression like:
=Max(MaintDate)

Then the main form can display that value using another text
box with the epression:
=subformcontrol.Form.txtLatest
 
Back
Top