Results 1 to 5 of 5
  1. #1
    jessica.ann.meade is offline Novice
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    8

    Cool How to track/count the occurence of a particular field


    Hi,

    I'm creating a VERRRY simple database (seriously, there are two columns of inputted data), but I am have difficulty in the Report-building phase.

    First let me identify the two pieces of data I am working with:

    Field A - Date of the Occurence (in this case teleworking)
    Field B - Staff Member


    I am interested in finding out what function/formula/etc I can use to add to the report subtotals of the number of entries for each Field B-item over a given period of time - in our case a month.

    Please let me know if you need any clarification!

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I take it you want to count how many times a staff members has teleworked.

    SELECT StaffMember, count(StaffMember) As Occurences
    FROM tableName
    GROUP BY StaffMember

    if you want some sort of a timeline, you will need to include a HAVING clause, something like:
    HAVING OccurenceDate >= #1/1/2011#
    which will count how many telework days each staff member has had this year.

  3. #3
    jzwp11 is offline VIP
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    You will need a query. Does your data span multiple years?

    Something like this should work (SQL view)

    SELECT month(FieldA) & "/" & year(fieldA) as Period, fieldB, Count(fieldB) as CountOfB
    FROM yourtablename
    GROUP BY month(FieldA) & "/" & year(fieldA), FieldB

  4. #4
    jessica.ann.meade is offline Novice
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    8
    Thank you all for the feedback. I think I've got most of it worked out, I just have one more issue.

    Can't seem to figure out the syntax of and where to place a string so I can input a date parameter (like "02/01/11 to 02/28/11") when generating a report.

  5. #5
    jessica.ann.meade is offline Novice
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    8
    Nevermind, I think I've figured this out.

    Thanks again!

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

Similar Threads

  1. Query to group and count field entries
    By newtoAccess in forum Queries
    Replies: 4
    Last Post: 11-29-2010, 09:19 AM
  2. Track change in a form
    By jmk909er in forum Forms
    Replies: 5
    Last Post: 10-19-2010, 04:05 PM
  3. First and second occurence
    By jamphan in forum Queries
    Replies: 6
    Last Post: 08-23-2010, 09:54 AM
  4. Showing Count in form field
    By randolphoralph in forum Forms
    Replies: 11
    Last Post: 05-17-2010, 03:52 PM
  5. How to count charcter or text in field
    By nshaikh in forum Queries
    Replies: 3
    Last Post: 09-12-2008, 10:27 AM

Tags for this Thread

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