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!

Subtotal of business days

Status
Not open for further replies.
Nov 7, 2002
61
US
I'm working on a project to calculate turnaround times in business days. The report is sorted based on a Type column. The four types are: COMM,SEN,POS,MEDI. What I need to do is calculate the number of COMM records that took 5 business days or more to turn around and COMM records that took 6 business days or more to turn around (and something similar for SEN,POS and MEDI).

I found a VBA function in another forum here that I've applied to accurately calculate the # of business days, so I'm left with finding a way to get a count of the # which are 5 days or less and the # that are 6 days or more. How should I go about this? Right now I have a count of the total # of records at each break in type and would like to have a total of business days that goes below it. I could also put them at the end of the report but at each section break would look neater.

I've tried just about everything that I can think of and am stuck. I'm used to working with sub procedures in forms and am new to functions and reports, so I'm kind of at a loss. Any help would be greatly appreciated.

 
You can try doing a query and include a field that has a calculation that might look like this.

iif(businessdays>5,1,0)

So if any days that have 5 it will have indicator of 0 and 6 or above will have a value of 1. Make use of the Dcount for total of 1 or 0's.

-Laughter works miracles.
 
Thanks, but I should have been more specific about my report. It's something that I'm automating (import specification, autoexec macro, etc), so I need everything to occur behind the scenes in VBA without any user input. So basically, what I need is a way to automatically generate counts of the number of records with the two criteria stated above, at the bottom of the report.
 
Found the answer to my question here: thread703-608256

I read here frequently for new ideas and solutions, so thanks guys. And I do award stars for helpful posts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top