Want the highest value in a table to be used in report

  • Thread starter Thread starter Nimrod
  • Start date Start date
N

Nimrod

I have an automotive database where I keep track of my maintenance. I will
be rewriting the database to have check boxes for (1) Oil Change (2) Repair
etc. The mileage is entered into a numeric field.

How can I get the report to find what the highest milage is (for example
using query to identify only oil changes) and then add 3,000 so the report
will display the next due mileage? And where would I plug in the VBA for
this?

Thanks in advance!
 
Nimrod said:
I have an automotive database where I keep track of my maintenance. I will
be rewriting the database to have check boxes for (1) Oil Change (2) Repair
etc. The mileage is entered into a numeric field.

How can I get the report to find what the highest milage is (for example
using query to identify only oil changes) and then add 3,000 so the report
will display the next due mileage? And where would I plug in the VBA for
this?


Just a text box expression, no VBA needed. In a group
footer or the report footer:

=Max("mileage", "thetable", "oilchange = True") + 3000
 
Back
Top