Results 1 to 5 of 5
  1. #1
    hklein is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    15

    Conditional count

    Hi, I would like to make a query, which counts fields contanining a specific field. I have a table: ID;Person;state;city (value of the city can only be city1, city2 and city3) As a result I would like to have a report,which tells, - how much persons are the total in the each state - how much person are the in ecah state where the value of the citiy is city1 - how much person are the in ecah state where the value of the citiy is city2 Thank you

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Build a report using Grouping and Sorting with summary calcs. Access Help has guidelines or Google: Access report grouping

    http://office.microsoft.com/en-us/ac...010006894.aspx
    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.

  3. #3
    hklein is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    15
    Thanks, although I expected a bit more concrete help

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Set up a group section on the city field. Have textbox in group footer count records, like: =Count(*).

    Make attempt and will be happy to review when you encounter issues.
    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.

  5. #5
    hklein is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    15
    Many thanks

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

Similar Threads

  1. Replies: 11
    Last Post: 12-21-2011, 09:48 AM
  2. Using conditional COUNT function
    By Laura WW in forum Reports
    Replies: 3
    Last Post: 11-08-2011, 11:59 PM
  3. Conditional count
    By jbr87 in forum Access
    Replies: 2
    Last Post: 09-28-2011, 05:55 AM
  4. Conditional count in query
    By jbr87 in forum Queries
    Replies: 1
    Last Post: 09-27-2011, 12:06 PM
  5. count with conditional
    By humpz in forum Reports
    Replies: 3
    Last Post: 08-02-2009, 08:11 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