Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 21st, 2004, 11:35 AM
Authorized User
 
Join Date: Sep 2003
Location: Upper Marlboro, Maryland, USA.
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

Reply With Quote
  #2 (permalink)  
Old March 21st, 2004, 06:27 PM
Authorized User
 
Join Date: Jun 2003
Location: Glendale, AZ, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:32 PM.


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