Results 1 to 6 of 6
  1. #1
    Forbes's Avatar
    Forbes is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    133

    Report Date Criteria

    Hello Everyone, I'm almost finished with a project I and some of you have been working on, I am at a crossroads with a Query criteria. My report prints showing something like this:



    Condition-------Number of Conditions--------Conditioned Employee
    (Simple List)----(count criteria)--------------(concatrelated based on employee name)(also separated by which department added the record.)

    I have a "Timestamp" in the Query as well "Where" Year([timestamp])=Year(Now()) and Month([timestamp])=Month(Now())

    The goal here is to only preview the records for that month based off time stamp however, when I run the report it now disregards my "which department added the record" and displays all fields with no thought to date? Can anyone explain why adding this Criteria made the report ignore all of them, also how to correct this problem.

    3 Departments = 3 separate reports

    I can accept either the ability to specify dates or have the program run reports for the current month.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    It would help to see the SQL of the query. At a guess, you've got an OR in there that makes it look at one criteria OR the other. I only see a person criteria in the version I've got.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    Can you give an example of the data in the query.

  4. #4
    Forbes's Avatar
    Forbes is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    133
    Thank you Paul, you were correct after opening the Query in SQL I changed the OR to AND, the report ran perfectly. You're a life saver haha!

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Forbes's Avatar
    Forbes is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    133
    https://www.accessforums.net/showthread.php?t=64973

    Are you familiar with ConcatRelated() adding conditions to the code? if you needed any more info that provided please let me know

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

Similar Threads

  1. Replies: 21
    Last Post: 08-16-2016, 09:46 AM
  2. Replies: 2
    Last Post: 04-02-2015, 12:45 PM
  3. Replies: 20
    Last Post: 01-13-2015, 02:23 PM
  4. Date criteria using between and form date picker
    By killermonkey in forum Queries
    Replies: 3
    Last Post: 03-21-2013, 12:44 PM
  5. Replies: 3
    Last Post: 08-21-2012, 03:05 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