Results 1 to 3 of 3
  1. #1
    2tMonte is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Location
    Louisville, KY
    Posts
    13

    Query Not Obeying Search Criteria - Won't Filter Properly

    I have a database to track documents who are short the proper funding to process. I have two queries, one to track authorizations (contain an "_A" in the document name, and one to track vouchers or local vouchers (contain "_V" for vouchers and "_L" for local vouchers). The idea is to list the documents which or currently short proper funding on a report or query for the budget officer to review. He will then add funds to cover the shortages and check a field called Funded. Once the Funded field is true, the document should drop from the unfunded query and move to the Pending Authorizations query or Pending Documents based on whether the document is an authorization or a voucher. The processing office will then review the list, attempt to process the document and check a field called Document Processed which should remove the document from the query altogether. Right now, the process is working perfectly except I have the records sorted by year (to properly manage fiscal year budgets) and the process only works for 2013 but not 2014. 2014 documents will not remove themselves from the query after the Document Processed field is changed to True. I have tried numerous variations but to no avail.




    Thank you all in advance.
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    This SQL is mixing AND and OR operators. Mixed operators can be very tricky. Possibly need the True and False criteria on each criteria row.
    Last edited by June7; 09-14-2013 at 09:50 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    2tMonte is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2012
    Location
    Louisville, KY
    Posts
    13
    Big thank to you June7! That is exactly what it was and when I tinkered with the SQL language, it worked. I did learn something about the queries though and that was the easy way to make the same adjustment. While in design view you simply keep adding rows of the criteria. For instance I copied all of the criteria and simply added each year (2013, 2014, etc...) making a row of criteria for each year instead of listing each year in the "or" sections but not filling out the redundant criteria. I guess the criteria was not redundant to Access.

    Sorry if I am the only person that this was news to but regardless, this site has increased my knowledge and made me more efficient.

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

Similar Threads

  1. Replies: 1
    Last Post: 01-30-2012, 12:12 PM
  2. Filter SQL query by criteria
    By IdleJack in forum Access
    Replies: 2
    Last Post: 08-18-2011, 05:56 PM
  3. Query filter search
    By mseeker22 in forum Queries
    Replies: 6
    Last Post: 06-22-2011, 03:35 PM
  4. Msgbox And Search Code Not Working Properly
    By vampyr07au in forum Forms
    Replies: 1
    Last Post: 05-02-2011, 05:16 PM
  5. Criteria or Filter for Query
    By Ryan in forum Queries
    Replies: 1
    Last Post: 08-29-2009, 11:50 PM

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