Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529

    Query not filtering for dates

    The following query should filter for dates between 1/1/23 and 12/31/23 but lists all values as shown in the anonymized spreadsheet which was exported. The query was built in the UI.



    Code:
    SELECT tblTransactions.Payee, Sum(tblTransactions.Deposits) AS SumOfDeposits, tblTransactions.TypeTrans, tblTransactions.TranDate
    FROM tblTransactions
    GROUP BY tblTransactions.Payee, tblTransactions.TypeTrans, tblTransactions.TranDate
    HAVING (((Sum(tblTransactions.Deposits))>0) AND ((tblTransactions.TypeTrans) Like "Div*") AND 
         ((tblTransactions.TranDate) Between #1/1/2023# And #12/31/2023#)) OR (((tblTransactions.TypeTrans) Like "Int*"));
    Attached Files Attached Files

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    It is also filtering for trantype like int*

  3. #3
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    @CJLondon
    Thanks'. I needed to add the Between on the line for the Like Int* and now it works. How simple things sometimes elude us.

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

Similar Threads

  1. Filtering a form between 2 dates
    By Keefay78 in forum Forms
    Replies: 19
    Last Post: 11-10-2020, 05:57 PM
  2. Working & Filtering Dates
    By the_reg in forum Access
    Replies: 2
    Last Post: 07-26-2013, 07:35 AM
  3. Replies: 7
    Last Post: 07-11-2013, 10:45 AM
  4. Filtering Dates Error!
    By emilyrogers in forum Forms
    Replies: 3
    Last Post: 02-15-2011, 03:00 AM
  5. Filtering Report with between dates
    By patrickmcdiver in forum Reports
    Replies: 3
    Last Post: 02-22-2010, 12:11 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