Results 1 to 9 of 9
  1. #1
    Dorethy is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2022
    Posts
    3

    Update products with new prices but keep old prices in the prevoius records

    Hello,



    I need to update products with the new prices but keep old prices in the prevoius records.

    I have a Customer, Event Details, Events, Products and the Promoter Tables, when I update the Products table prices the change also in the old reports. Is there an easy way to have the future records only updated with a new prices?

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    You could have repeating rows in your products pricing with a date field to archive it. If null, the price is current. If not, it gives you a marker that you can match up with an invoice or PO. My db background is mechanical and ISO related databases, so I've never really understood this problem. It's always been my understanding that your PO or invoice line item contains whatever price was current at the time as a field record, not as a reference to the price data. That way if it was $1 at the time, it remains $1 on the report/invoice/PO forever.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Dorethy is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2022
    Posts
    3
    Thank you for the answer. As I am new to access i need to clarify some details,

    You could have repeating rows in your products pricing with a date field to archive it

    Do you mean creating new table with a date column in it?

    If null, the price is current

    Do you mean here that I need to create a query and asingn a Date to with a null creteria?


    If I sent you the file maybe this could be more helphul?


    Thank you very much!

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    1) means you add a date field to your existing table (e.g. EndDate < notice the lack of spaces and no using reserved words such as "Date"). If EndDate has no value, the price is current. 2) When you need it, you retrieve it with a query but add the criteria as (e.g) WHERE ProdID = 65 AND EndDate Is Null. Your comment suggests you base your forms and reports on tables, which is something I rarely do.

    However, using the date method means you have a new record where all the product field data is repeated each time you archive a price - not what I would do. To avoid repeating data, you'd need a separate table whose FK (foreign key) field contains the Product ID PK field but you'd still need a way to archive the price.

    You can post a db (usually it must be zipped after you run a compact/repair on a copy) but as I said, commerce wasn't my thing. Posting will help others to help you. What I'm not understanding is why people ever do it this way, so I'm hoping to learn of a valid reason if there is one, by replying in the first place. IMO the thing to do is have your current price and that value becomes the value in the price field of other tables such as PO and invoice. You'd then be able to look back 10 years ago to see what something was priced at, but I might be out to lunch with that notion.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Further to micron's response, you may find this post on AgreedUponPrice helpful. I have referenced the same concept in various threads when discussing historical invoice info, loyalty programs, specials, clearance sales etc.

    Good luck.

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    I use a similar approach as that described by Micron with the difference that the Products table would have an EffectiveDate (or PriceStartDate) instead of an EndDate. I usually then create a TOP 1 query sorted ascending by ProductID and descending by the EffectiveDate with parameters coming from you form (<=Forms!frmYourForm!InvoiceDate). That would return the latest price that was in effect at the time of the invoice. You can also get that by using domain aggregate functions(dLookup, dMax). If using this approach then you can add future prices and produce invoices for future events with different prices for each.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  7. #7
    Dorethy is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2022
    Posts
    3
    Thnak you!

  8. #8
    Join Date
    Apr 2017
    Posts
    1,681
    Another approach is to have a table for current prices, and write the current price into sales (and/or purchases) log when the log entry is created. So whenever you need to get the price of product at certain date, you query it from sales log. The caveat is, this approach assumes excellent sales registering discipline, or a possibility to enter the price manually when the log entry is made later.

  9. #9
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,943

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

Similar Threads

  1. Replies: 10
    Last Post: 11-01-2020, 01:50 PM
  2. Parts and prices query
    By faca in forum Queries
    Replies: 6
    Last Post: 07-23-2018, 07:37 AM
  3. How to set up different prices for the same product.
    By kwstein in forum Database Design
    Replies: 1
    Last Post: 05-19-2018, 08:44 AM
  4. Replies: 4
    Last Post: 12-25-2016, 10:46 AM
  5. Replies: 2
    Last Post: 09-23-2012, 10:20 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