Selecting data based on activity in a given month

T

tlayrock

I have equipment that I use on different jobs. I might use piece of
equipment on three different jobs in a single month. I have made a few tables
with start date and end date fields for when the piece of equipment starts on
one job and ends that job. I am then charging myself internal rent for the
equipment on a by day basis.If the equipment is on the job for 10 days I want
to charge myself 10 days rent for that piece of equipment. ( Excluding any
non working days, ex: sundays and holidays)

My problem is how can I Filter my data so that I can get a report that shows
all the activity of my equipment for a particular month.
 
A

Al Campagna

tlayrock,
The problem here is that a piece of equipment might have a StartDate in one month, and
an EndDate in another. You may want use a date range for just the StartDate, and let the
EndDate fall where it may.

In preperation for your report, you'll have to enter Starting Date and Ending Date
parameters for the report, either through unbound form fields, or through Input boxes.
Using Input boxes for example... in the query behind your report, use this criteria
against the Start date...
Between [Enter Starting Date] and [Enter Ending Date]
When the report is called you'll be, prompted by input box, for two dates, and the report
will return any Start date between those two values.

If you only want transactions that are completly within a month, place the very same
criteria in your Ending date query field.

Also... DateDiff("m", EndDate, StartDate) Would calculate the number of days between
Start and End dates, and multiplied by some rate, would yield the total expense for each
lease..
 

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