Results 1 to 5 of 5
  1. #1
    frustratedwithaccess is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Oct 2014
    Posts
    35

    Counting records

    Hi All,

    I am hoping someone can help with a counting issue I am having...How can I count the number of records in a field (of a query) and ignore the differences in the data? For example, I have a query with multiple fields that can be grouped according to "ProjectNumbers", "SampleDates", "SampleTime" etc. The field that varies is my "Species" field. It has a list of different animal species observed according to the above fields. In any given project, on an given day or time there can be multiple species listed, one species listed, or no species listed. All I need is to count the number or records for a given project number, date and time, regardless of the species. For example, if there are 5 species listed, then I want access just to count the number of records, which in this case will be 5.


    my data looks like this

    ProjectNumber SampleDate etc etc Species
    1 Mar 23/15 zebra
    1 Mar 23/15 zebra


    1 Mar 23/15 elephant
    1 Mar 23/15 gazelle

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Have you looked at the SQL tutorial at w3schools and the Count function

    You may also research the Group BY while you are there.
    Work with the tutorial an some examples--you'll learn by doing.

    Good luck.

  3. #3
    frustratedwithaccess is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Oct 2014
    Posts
    35
    Quote Originally Posted by orange View Post
    Have you looked at the SQL tutorial at w3schools and the Count function

    You may also research the Group BY while you are there.
    Work with the tutorial an some examples--you'll learn by doing.

    Good luck.
    Yes, I understand the concepts of Group By, and have also looked at the count functions...Unfortunately I have not been able to count and display the records as I'd like to, hence posting here.

    Anyway, thanks for the post

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Post your table designs and the sql you are using/trying.

  5. #5
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    All I need is to count the number or records for a given project number, date and time, regardless of the species
    Code:
    Select count(ProjectNumber) from YOURTableName
    Where SampleDate =[Enter a SearchValue in Mar 23/15 format]
    Note: You don't indicate that you store a time value in your example data.

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

Similar Threads

  1. counting records
    By Jrw76 in forum Access
    Replies: 5
    Last Post: 01-14-2014, 02:11 PM
  2. language for counting records.
    By Jrw76 in forum SQL Server
    Replies: 11
    Last Post: 01-14-2014, 01:56 PM
  3. Counting records
    By mjsabin in forum Access
    Replies: 1
    Last Post: 03-06-2012, 11:11 AM
  4. Counting Only Certain Records
    By jtphenom in forum Queries
    Replies: 9
    Last Post: 03-29-2011, 01:25 AM
  5. Counting Records
    By WhiteNite1971 in forum Access
    Replies: 1
    Last Post: 01-22-2011, 06:36 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