record history help

R

ryan.fitzpatrick3

I have a record set of data. If I want to update parts of that data,
and keep the orginal record how would I go about doing so? Example

Item# 123456
Desc: Cookies
Supplier # 22356
Supplier Desc: Cookie Monster

date 9/11/9

chocolate chip cookie $1.00

I'd would like to keep the basics the same and I would like to have
the item chocolate chip cookie populated, I just want to add a new
date and change the price, how do I do this? If I wanted an update
feature on a form to add a new price/date, how do I get the data I
want to carry over to carry over? Ideally I would like it like this

Item# 123456
Desc: Cookies
Supplier # 22356
Supplier Desc: Cookie Monster

date 9/11/9

Chocolate chip cookie $1.00

date 10/1/9

Chocolate chip cookie $0.95

How do I record a history?


Ryan
 
D

Dale Fye

Generally, if you want to maintain a price history, you need a separate table
(tbl_PriceHistory) for that, with fields for the Item#, EffectiveDate, and
Price.

Then, create a subform that contains fields for all three elements, but only
displays the effective date and price. Add this subform to your main form
and set the master/child relationship fields to [Item#].

Another way to do this is to store the CurrentPrice in your main table, in
the AfterUpdate event of that field, execute code that inserts the new price
into the database. I don't particularly care for this method, because you
may need to enter the new price into the database before it actually becomes
effective (especially if you have a lot of products).

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top