Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Based on Date Query To Track Jail Inmate Transports

Status
Not open for further replies.

Budster13

Technical User
Jul 11, 2002
12
US
I’ve written a database with the assistance of Tek-Tips Forums programmer SCRIVERB, but have run into a new problem that I thought was working correctly. I’ve tried to reach SCRIVERB though his email shown in his profile, but it’s currently not active.

I need a report that tracks the number of jail inmates who are transported (trip) per day for the month.

I called it a “trip” because we are reimbursed for two officers assigned at a rate of $15.00 per hour for 1.25 hours of work and 44 miles at 36.5 cents per mile. That’s the average time and distance it takes us to transport an inmate from our jail to the federal courthouse or from there and back. Typically, we would leave the inmate with them for the day in the morning and pick the inmate back up in the afternoon. They will pay us for both the morning round trip (there and back) and then for the afternoon round trip (there and back again). Since each trip one-way takes 1.25 hours and is 44 miles long, one round trip (morning or afternoon) is 2.50 hours and 88 miles long or 5 hours and 176 miles for the whole day. But, there’s an additional problem. We may transport the inmate to the federal courthouse and may not bring him back (such as a sentencing where he’s taken directly to the Bureau of Prisons). In this case, we can only charge for the one-way trip.

I’m thinking, I need a report that will group by date for a given month (date parameter) all of the inmates who were transported, subtotaled for each day and totaled for the month. We can charge the government for each trip, but if the only trip for the day was a one-way trip, then that’s all we can charge for.

 
I'll assume you have a table 'Trips'
The 'trip' can be one-way or two-way.
The two-way trip is exactly double as the one-way trip
If you place a Yes/No field (TwoWay) in your table and update it to Yes when the bad guy is brought back, your calculation formula can be:

NewFormula = OldFormula * (1 - TwoWay)

(it's 'minus' because True is -1)

Is it what you need?

Dan
[pipe]
 
Dan,
Thanks for your response, but it's a little more complicated then this, I think. I'm also not very adept with VBA.

Budster13
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top