Results 1 to 2 of 2
  1. #1
    JenBouchard is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    1

    Counting Dates

    Hello.



    I have a database where we want to know the number of days a particular service was received.

    In the table, a date is entered, a client ID is entered and if received, services A, B, C or D are checked.

    I was able to figure out how to sum the services (either A, B, C, or D) when prompted for a particular client ID between two dates. The tricky part has been to sum the (unique) dates a service (either A, B, C, or D) has been received. In other words, we know how many times Service A was provided to Client123, but how many days of service did Client123 receive?

    Is there a way to use the sum function on a report to do this?

    Forgive me if I'm not asking this the right way; my degree is in research (and I have taught myself database design on my own) so I appreciate any help you can offer.

  2. #2
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    Hi JenBouchard,

    A basic approach for this is to use two queries. The first would query the table for ClientID and ServiceDate using the "Totals" (Summation Icon) to group the fields. The second would query the first query, again with "Totals", for ClientID as a Group By and again as a Count. The count will give you the number of days your client received service.

    Cheers,

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 08-27-2009, 01:21 AM
  2. Help with counting Query
    By metalhead22 in forum Queries
    Replies: 8
    Last Post: 04-29-2009, 02:07 AM
  3. Counting rows
    By anishap in forum Access
    Replies: 0
    Last Post: 10-08-2008, 10:41 PM
  4. Need Help counting occurences
    By anyoder in forum Queries
    Replies: 0
    Last Post: 03-09-2007, 08:53 AM
  5. Counting distinct id's
    By jqljql in forum Access
    Replies: 1
    Last Post: 09-01-2006, 07:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums