Results 1 to 4 of 4
  1. #1
    shod90 is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Jan 2016
    Posts
    134

    price changing problem.


    Dear Gents,
    I faced a big problem when a price of one of my products was changed on my database , All reports are generating results for the new price !! .. Example to be more clear.
    On 1st of October the cheese was 12$ and now the cheese 13$ , All the reports generating that the cheese was sold with 13$ even 1st of October .. How can i control this problem ??

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Options:

    1. save price in orders table, will probably require some code - create Price field in table and run an UPDATE query to populate with the original price and use code to save Price in future records

    2. create a new record in products, add a field IsActive and set the old record as not active, apply filter in combobox so the inactive product records are not available
    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
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

  4. #4
    Join Date
    Apr 2017
    Posts
    1,679
    Create a table tblPriceLog: PrlID, ArtID, PriceFrom, Price;
    Create a function udfPriceByDate(parArt, parDate), which returns price for article/service at given date from tblPriceLog.
    (the function must be the analog for query like "SELECT TOP 1 Price FROM tblPriceLog WHERE artID = parArt AND PriceFrom <= parDate ORDER BY PriceFrom DESC")

    In your p.e. Orders table, remove the Price field - you must have ArticleID and sale/purchase date there instead;
    In your forms, reports, etc., you can use unbound controls to display the price, using udfPriceByDate() function.

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. Replies: 4
    Last Post: 09-23-2015, 09:13 AM
  4. Replies: 5
    Last Post: 11-23-2014, 03:54 PM
  5. Problem with Minimum Price in IIf argument
    By bellevue in forum Queries
    Replies: 5
    Last Post: 04-06-2012, 02:40 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