Grabbing Highest Value in Subform | Next Scheduled Maintenance

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.
 
M

Marshall Barton

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top