stored calculations

teiben

Registered User.
Local time
Today, 17:49
Joined
Jun 20, 2002
Messages
462
I've read the posts regarding not store calculations. However, I was told by IS to store the mileage IRS deduction as it changed 3 times last year.

Any idea's how to handle this? I need the table to remember how much $$ was paid out in mileage expense. I had set up a field called mexpense and mileage, where =[Mileage]*0.375.
 
The mileage should be stored, it is part of a calculation. It is the calculated item you shouldn't keep, except if one of the variables changes. As for the rate, there are several ways of doing it, the simplist is to hard code it, like you did and just change the rate when needed. Another is the build a table and make the changes in the table. And there are more if I try hard, but that shold get you started. hth.
 
One of the best ways to store things like this, would be to have a table for the rates and the effective dates of those rates. And, for the other table that has the mileage, it should have a date to go with that mileage. Then, you can match up the dates with the effective dates and have the multiple rates calculate properly.

At least, that's what I would do. It would make it easy to be able to add an end date to the active rate and add a new rate with the new start date. Should work well.
 
And... Using BobLarson's method, when someone gives you their expense claim nine weeks late, you can ensure they get paid at the rate appropriate to when the journey was taken :D
 
In relation to this

Can someone help me set this up?

I have a table for rates but it has no date, do I add a date field? or two date fields?

I have another table that stores the mileage among other things...

I dont know how to bring them together..

Thanks.

Fen

One of the best ways to store things like this, would be to have a table for the rates and the effective dates of those rates. And, for the other table that has the mileage, it should have a date to go with that mileage. Then, you can match up the dates with the effective dates and have the multiple rates calculate properly.

At least, that's what I would do. It would make it easy to be able to add an end date to the active rate and add a new rate with the new start date. Should work well.
__________________
Bob Larson
Forum Moderator
HTH
 

Users who are viewing this thread

Back
Top Bottom