Thanks for the replies to my earlier question I am now ready to take another
step.
For Tax purposes I need to show how much of the mileage of my car is
business and how much is private.
I have a table in which I record my business trips.
It has the following fields
Date /description / startmiles / endmiles
I can set up a simple parameter query and report that gives me a list of
business trips for any period.
So far so good.
I'm not very familiar with SQL or VBA at the moment.
To calculate the business %
I think I need to do the following and aren't sure how.
Total business miles for the month. This I can do.
Find the row before the first row in the parameter query.
Extract the ENDmiles figure from that row to use as a variable(?)
Monthstart.
This is the bit that foxes me.
Find the maximum endmiles figure from within the parameter query.
I assume =Max([endmiles]) would work.
My business miles then become
Sum ([Business Miles]) / (Max([endmiles]- [monthstart])
Thanks for any assistance.
Mike
www.mikethebass.moonfruit.com