Build the price history table.
PriceHist—
ProductID – data type to match your existing fields
OldPrice – data type to match your existing fields
NewPrice – data type to match your existing fields
Update – Datetime field – default =Now() puts time tag as you may change
more than once in a day
Build an append query to append to PriceHist. Put this field in the design
view grid field row.
X : [Forms]![YourFormForPriceChange]![ProductID]
Y: [Forms]![YourFormForPriceChange]![OldPriceField]
Z: [Forms]![YourFormForPriceChange]![NewPriceField]
Create a macro that opens the above query and requery.
In your form that you would use to change prices, have a price field and new
price field that is unbound. In the new price field properties have it call
the macro on change.
Build a Totals query using the PriceHist table and Max the Update field.
Your product query would join product table and the Totals query on ProductID.
FA said:
I can't find anything that helps.
Do I need to explain further? Please help.
:
See post "audit trail" or "history."
:
Please help.
I'm trying to produce a product price list from a table that records all the
price history for each item. The query should show only the last date it was
updated for each item in the list. This price would be the current price for
each item. How can I do this?
Any suggestions?