Results 1 to 4 of 4
  1. #1
    Cdroyer is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2018
    Posts
    2

    Question on how to find the price at the time of service

    Hello,



    I am working on a database for SKUs that has price changes weekly. For one vendor, the prices are effective at different points of the week (so not every Sunday, but as the supplier changes). I would like to be able to see when a customer purchases the product what the price was for that vendor.


    For example,

    Customer buys part on 5/5/16, the supplier price as of 5/3/16 was $5. The price later changed on 5/14/16 to $5.25. I want to be able to run a query based off of my Customer Table that would give me the Supplier Price of $5 because that is what it cost when the customer purchased the part. I am running into some issues on how to frame the query to find the last previous date.

    Any suggestions would be useful.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    If you don't save the price record ID into the purchase record, this can get rather complicated. Provide info on table structures and relationships, sample data would be helpful.
    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
    Cdroyer is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2018
    Posts
    2
    Hi June7,

    For simplicity these would be the tables and the columns that relate.

    Purchase Table
    SKU Number
    Date of Service
    Cost of Service

    Supplier 1(
    Price can change whenever)
    SKU Number
    Date Price Changed
    New Price


    Supplier 2 (
    Price changes monthly)
    SKU Number
    Month Price Changed
    Year Price Changed
    New Price

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    SKU is primary/foreign key? Why two tables for suppliers? One should serve regardless of frequency. Just adding complication.
    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.

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

Similar Threads

  1. Order Entry Form - Case Price vs. Unit Price
    By Kaloyanides in forum Access
    Replies: 4
    Last Post: 05-18-2017, 06:31 AM
  2. Replies: 17
    Last Post: 12-14-2015, 10:23 PM
  3. Calculate Time in Service (year, month, day)
    By Randell in forum Programming
    Replies: 2
    Last Post: 07-30-2015, 05:49 PM
  4. find price in a table
    By bill1138 in forum Queries
    Replies: 2
    Last Post: 12-28-2011, 12:44 PM
  5. Replies: 1
    Last Post: 10-06-2009, 02:00 AM

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