Results 1 to 3 of 3
  1. #1
    Xine is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2016
    Posts
    19

    How to filter by count value in my Form-Based-Query that generates a Report.

    I do the admin for a employee volunteer program.
    I created a User Form that can filter the program information based on company, office location, and/or employment status (and generates a report).


    I'd like to allow the user the option of filtering by the number of years an employee has participated in this program.
    Since there isn't a field that has this (count) value stored, I tried adding a count field to the query but it doesn't work properly on account of there being other unfiltered data details that are included for the report.

    I'm clearly going about this the wrong way. Should I somehow filter the report instead of the query? Direction with examples would be appreciate

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    the # years, is a date formula
    =DateDiff("yyyy",[startdate],Date())

  3. #3
    Xine is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2016
    Posts
    19
    The (program) year is better described as an event occurrence rather than a passage of time:

    Some employees have never participated, others have a spotty history of participation while a few have participated every year since the program was offered in 2003.

    I'm not sure but I don't think I can use a DateDiff here, no?

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

Similar Threads

  1. Replies: 7
    Last Post: 08-19-2015, 10:46 AM
  2. Replies: 3
    Last Post: 06-18-2014, 10:40 AM
  3. VBA for Report Filter based on Form Checkboxes
    By Kirsti in forum Programming
    Replies: 11
    Last Post: 04-23-2014, 04:52 PM
  4. Replies: 5
    Last Post: 03-03-2014, 11:07 PM
  5. Count records based on report ,not in query
    By Abasalic4 in forum Reports
    Replies: 1
    Last Post: 04-13-2012, 12:46 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