Results 1 to 2 of 2
  1. #1
    Ghoztrider is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    2

    3 values in 1 Column - Get Count of Each Value

    Good Morning,

    I'm trying to create a query that will give me the count of how many times 3 different values show up in one field between 2 dates. I have the parameter query portion set up fine already. For instance, I have a table named JobTracker with 2 columns ( date & task). I want to create a query that gives me the count for 3 different values (edit user, edit heci, edit clli) between two dates. I want a separate columns for each value in the query.....edit user, edit heci, and edit clli respectively.



    I've been messing around with a bunch of different options but can't seem to come up with anything. This should be possible, correct? I hope I've given enough information. Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Did you try CROSSTAB query?

    Or try:
    SELECT Sum(Iif([task]="edit user",1,0)) As CountUser, Sum(Iif([task]="edit heci",1,0)) As CountHeci, Sum(Iif([task]="edit clii",1,0)) As CountClii FROM JobTracker WHERE ...
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 2
    Last Post: 12-05-2011, 04:53 AM
  2. Replies: 3
    Last Post: 09-28-2011, 04:29 PM
  3. Count Field Values.
    By Cined in forum Access
    Replies: 3
    Last Post: 03-03-2011, 03:21 AM
  4. Replies: 2
    Last Post: 11-18-2009, 06:49 PM
  5. inserting values in column based another column
    By wasim_sono in forum Database Design
    Replies: 1
    Last Post: 06-27-2006, 05:23 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