Results 1 to 3 of 3
  1. #1
    mpreston14 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2013
    Posts
    41

    Counting/totalling non-numeric fields

    Hello,



    In my soccer referee database, I am capturing a whole host of data, some of which is non-numeric but I still want to count the instances of that data. How is the best way to do so?

    I have tried a couple of ways in the query, I even have tried converting the data to a number then counting it via an IIF statement:

    Total_BU10_Matches: IIF([Match]=BU10,1,0) and setting the Total to Count, it sort of works, but its not just the BU10 matches, it counts all of the referee's matches. I have tried with and without quotes around BU10 and it doesnt impact the output.

    I have tried putting criteria on the above but I get data type mismatch error messages.

    I would like to have a column in the query that pulls the totals for each of the Match possibilities.

    I have searched but the examples I have read haven't been similar to what I am looking to do, ie I didn't understand them

    As always your help is greatly appreciated.


    Mike

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    BU10 must be within quotes because it is literal text.

    Then use Sum instead of Count on the constructed field.
    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
    mpreston14 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2013
    Posts
    41
    Worked like a charm! Thanks!

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

Similar Threads

  1. Replies: 6
    Last Post: 10-02-2013, 11:32 AM
  2. counting fields
    By mcchung52 in forum Queries
    Replies: 2
    Last Post: 03-08-2012, 04:00 PM
  3. Importing numeric fields with null values from XML
    By hcorvallis in forum Import/Export Data
    Replies: 1
    Last Post: 10-20-2011, 08:09 AM
  4. Creating a Flat File with Signed Numeric Data Fields
    By two_smooth in forum Database Design
    Replies: 2
    Last Post: 10-27-2010, 08:31 AM
  5. Replies: 5
    Last Post: 06-07-2010, 12:20 PM

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