Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 21st, 2004, 11:35 AM
Authorized User
 
Join Date: Sep 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default Counting Tasks in "Task Report"


I have a Task Report that identifies all of the tasks that my company performs over the course of the year. Some tasks are performed “D” for Daily, or 250 times per year; “7W” for 7 days per week, or 365 times per year; “M” for monthly, or 12 times per year, etc. I created the report that has headings as follows

• Frequency
• Task
• Building
• Floor
• Area

The report is grouped by Frequency and sorted by Task, Building and Floor. I want my report to automatically count the number of Daily tasks then multiply by 250; count the number of 7 days per week tasks, then multiply by 365; count the number of Monthly tasks, then multiply by 12, etc., so that I can have a total number of tasks that are performed during the course of the year.

Any help will be greatly appreciated.

Thanks,

David

 
Old March 21st, 2004, 06:27 PM
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

David,
   This solution will work in the query for your report.

   iif([Frequency]="D", Count([Frequecy])*250, iif(Frequency=7W, Count([Frequency])*365))

   The code may not be exact, but you get the idea. Just keep adding iif statements for each of the frequency's you want to test for. I'm sure it can be done with in the query.

Hope this helps,
Mike





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add task in Scheduled Task programatically amitjoshipune C# 2 July 31st, 2008 05:42 AM
Counting 'groups' of records in a report Odeh Naber Access 4 July 30th, 2007 10:41 AM
Execute Task from ActiveX Script Task PorcupineRabbit SQL Server DTS 1 January 10th, 2006 12:37 PM
Too many client tasks pbyers Classic ASP Databases 0 May 3rd, 2005 01:04 AM
Counting Tasks in "Task Report" twsinc Access 1 March 24th, 2004 09:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.