Results 1 to 5 of 5
  1. #1
    LeadTechIG is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2014
    Posts
    23

    Query Results filter by date (today) in two fields

    All,

    I am trying to amend a query that I have used for a long time, that shows me a list of all the assets I have that are ready for sale. What I would to accomplish is to have the results of the query only show me what is NEW to those criteria. Here is the kicker: I have two fields that are updated independently of each other - the date the asset processed at my facility, and another for the date that it passed our product testing if needed. There are NO line-items where those dates are the same.



    The three criteria are that the asset read "Finished Goods" under [Asset Status], "Today" under [Date Recorded], and "Today" under [Date Tested].

    My concern is that I will amend my query so that the results are just "Finished Goods" under [Asset Status], AND *"Today" under [Date Recorded]* or *"Today" under [Date Tested]* where I need both to be true.

    Any help would be much appreciated.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    In your query design you have OR lines under your first criteria.

    So the first line of your criteria would read 'finished goods' under asset status and your 'date recorded' criteria would be date() or [Enter the date]
    On the second line of your criteria you would have 'finished goods' under asset status and your 'date tested' would be date() or [Enter the date]

    Each row represents a different OR, you just have to repeat the static criteria (in this case 'finished goods' in the asset status field) for each row.

  3. #3
    LeadTechIG is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2014
    Posts
    23
    Thank you very much. This solved my problem.

  4. #4
    LeadTechIG is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2014
    Posts
    23
    I have a new additional concern, but I did not think it warranted a new thread. I'm looking to generate a week's worth of information, but I do not know how to go about doing that with TWO date fields. I have a query that results in a single day's worth of information via both date fields, but if I wanted the parameter value to be a business week, how would I go about doing that?

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    in your date field criteria put

    Between [Enter the Start Date] and [Enter the End Date]

    when the query is run the user will be prompted for dates or use a form and reference the start and end date like:

    Between forms!frmCriteria!StartDate and forms!frmCriteria!EndDate

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

Similar Threads

  1. Replies: 5
    Last Post: 10-12-2012, 11:00 AM
  2. Replies: 5
    Last Post: 05-24-2012, 02:34 PM
  3. Replies: 12
    Last Post: 04-26-2012, 04:01 AM
  4. Replies: 4
    Last Post: 03-23-2012, 01:18 PM
  5. query date that is five years older than today
    By cpsummer in forum Queries
    Replies: 2
    Last Post: 09-26-2007, 02:31 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