Michael Pfennings said:
Ok, here's the deal. A part of the Service Database the engineer is
required to enter some info, like Travel, Service Provider, What Rate.
etc... Some of it is entered on the form, the rest is calculated based on
what options the Engineer picks.. This info is then calculated in a Text
Box (Control Source)(Eg.
"=IIf([ActivityOSorWS]="WorkShop",IIf([PerHourRate]............"). Now
thats all great for a result.. but if I was to invoice this client the
amount would be correct and current to today's rates. But because my
Rate's are listed in a table for future additions and changes, this value
becomes a variable. So for example if I was to change the rate, and say
the client has lost his invoice and we just had an adjustment to our rates.
Well with the currrent setup and I changed the rates, the recalculation of
that invoice will refelect the changes, and not the original rate. If I
was able to copy the results and record them in a field. I could use a
switch that will lock that record from any changes once that job is closed.
Does this make any sense.. I know there's a better way, but I'm still
seeking a better way. The way things were done before was that the
Engineer put in the figures themselves.. however this has proven in
incorrect amounts and losses in revenue.. I'm trying automate this all.
I hope this helps.. Thanks again
Two standard ways to handle this.
(1)
Store all values necessary to derive the final calculation. In your case
whatever rate is variable would be retrieved from the lookup table one time
and stored as part of the record. An equivalent example is on an Invoice
or Order. You store the ItemID, the Qty, and the current Unit-Price. This
allows you to calculate the extended price at any time and since you stored
the Unit-Price with the record it is not affected by future changes in
Unit-Price.
(2)
You modify your rate lookup table to include a history of all changes with
a StartDate and EndDate. Then your lookup for individual records can use
the date of the record to retrieve the appropriate rate based on the
StartDate and EndDates. I find this method a lot more complex, but a lot
of people use it.