Daily Price Variation Causes Profit Integrity Issues

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am modifying the Orders Management template provided by the Microsoft
template site. It's perfect so far, but I have run into a major problem. My
costs vary on a day-to-day basis and I want to be able to update my master
costs list daily without it affecting orders submitted prior to "today's"
date.

Example: yesterday, widgets cost me $0.33 a piece and my vendors were
invoiced according to that price. Today, widgets cost me $0.20 a piece and I
want to update my master list to reflect this cost (so that I only have to
update all my changes only once today), so that when I invoice today's
customers it will be at today's cost, but will not change yesterday's
information.

Then, I need to run the daily, weekly, monthly, etc. sales reports wtih the
correct information. Any help is so appreciated.
 
The Northwind has code in the After Update event of the Product combo box to
store the current unit price in the Order Details table:

On Error GoTo Err_ProductID_AfterUpdate

Dim strFilter As String

' Evaluate filter before it's passed to DLookup function.
strFilter = "ProductID = " & Me!ProductID

' Look up product's unit price and assign it to UnitPrice control.
Me!UnitPrice = DLookup("UnitPrice", "Products", strFilter)

Exit_ProductID_AfterUpdate:
Exit Sub

Err_ProductID_AfterUpdate:
MsgBox Err.Description
Resume Exit_ProductID_AfterUpdate

End Sub
 
Back
Top