Results 1 to 2 of 2
  1. #1
    m.pietrzy is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2019
    Posts
    1

    Unique Date Quries

    I have a table named INVENTORY. Each day, the current tank inventory is entered. I want to compare two unique dates vs. a range of dates. From that comparison, I can add raw material receipts and shipped goods and determine actual production.



    For example: If on 01-May-2019 a tank contains 100 (we'll call this "x") and on 07-May-19 contains 300 (we'll call this "y"). In between 01-May and 07-May, I received 1000 (we'll call this "z"), the amount processed is 800. ((x+z)-y)=processed amount.

    Where I'm getting wrapped around the axle is trying to query the specific dates vs. "between" dates. The only way I can seem to get close is by using a "start" query, a "finish" query, a "received" query, and a "shipped" query. From there I would build a main report with four sub-reports and from there perform the calculations in the report.

    Is this a good approach... or is there a better (I'm sure there is but my eyes are crossing at this point).

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Not really sure what you mean by "trying to query the specific dates vs. "between" dates." Sounds like you want a value on each of two dates (one before and one after) plus a series/set of records that come in between. Maybe look at http://allenbrowne.com/subquery-01.html

    If all you want is a value on two given dates and you know those dates, then you can retrieve those easily enough. Perhaps then you want to show all the records that come in between, or maybe you just want to total the units processed during that period? Kinda fuzzy. Depending on where you're doing what, maybe all you need is a DLookup on each of the 2 dates with either records or aggregate functions on what comes in between.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 2
    Last Post: 01-03-2016, 12:03 PM
  2. quries and subform
    By trigstar in forum Access
    Replies: 4
    Last Post: 03-19-2013, 10:43 PM
  3. Some Quries
    By Arsalan in forum Forms
    Replies: 2
    Last Post: 01-19-2013, 10:59 AM
  4. Replies: 3
    Last Post: 06-05-2012, 10:49 PM
  5. Replies: 1
    Last Post: 01-24-2012, 01:13 AM

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