Results 1 to 5 of 5
  1. #1
    bootu is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2016
    Posts
    7

    Angry Date Range and Invoice Date

    I have two tables: A & B

    Table A contains sales info: product number, product type, invoice date, and invoice price

    Table B contains contract pricing information: It is based on the product number, product type. The contract pricing information is based by product type and specified date ranges:



    • I.E Product number 1 with product type 1.A pricing info is $10 from 01/01/2015-10/31/2015 and for the same product number and product type price is $15 from 11/01/2015 to 12/31/2016



    How can I write a query that will select the specific contract price based on the invoice date? Any insights is appreciated.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    Your product table must have a StartDate field and an EndDate field, along with price, product id, etc, etc.

    Then you will rely upon a query of matching Product IDs with the Invoice Date as criteria in being >= StartDate AND <= EndDate

  3. #3
    bootu is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2016
    Posts
    7
    I appreciate the quick response. What do you mean by product table? I have a sales data and contract pricing Info table. The way to connect the two tables will be via product number and product type. Am I missing something here? Thanks again.

  4. #4
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    to me a table that lists all the products is a product table - but there is no problem in it being called a contract table..... the advice is the same...

  5. #5
    bootu is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2016
    Posts
    7
    Thank you! That worked!

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

Similar Threads

  1. Replies: 4
    Last Post: 11-20-2018, 11:57 PM
  2. Replies: 3
    Last Post: 01-26-2016, 01:56 PM
  3. Replies: 4
    Last Post: 04-25-2015, 04:17 PM
  4. Replies: 3
    Last Post: 09-11-2013, 09:49 AM
  5. Replies: 3
    Last Post: 07-18-2012, 10:13 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