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

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

Marshall Barton

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
 

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