By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,611 Members | 1,464 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,611 IT Pros & Developers. It's quick & easy.

A Query / Report Question with a difference.

P: n/a
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

Mar 5 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.