H
hawk_2001 via AccessMonster.com
I have read multiple threads regarding storing calculated values in tables.
I do acknowledge that it is generally a BAD IDEA to try to store calculated
values in tables. I have also seen that sometimes it can be okay to do this
in certain circumstances.
I am soliciting advice for a project I am working on.
I have built a "Margin/Revenue Calculator" that allows a user to input
various costs and determine what revenue is necessary to acheive a certain
margin, or see what margin a certain revenue will generate. Before going
further, I must state that none of these calculations are being stored in a
table. I am only storing the parameters for the calculations (miles traveled,
hourly wage, etc.), and letting Access compute the calculations at run-time.
I am having trouble with a few of my variables. One is an "Employee Benefits
Cost". What state an employee works in, and his current salary rate dictates
what his "Benefits to Salary Ratio" is. For example, a driver in Georgia
making $25,000/year has a benefits cost ratio of roughly 45% (it costs the
company $25,000 + 45% ($11,250) per year to employ this person).
I have a query that calculates this percentage, and I want to be able to
store this percentage in a table (because the values for each calculation
will change). I am needing a "snapshot" of the record and its "declared"
parameters in case an executive needs to view it in the future. I do not
want the user to have to go through the motions of setting a benefits cost
each time they look at a record.
Right now, I can get a text box to reflect this calculation, using the
DLookUp function. But, since I can't bind the text box to a table AND
display the value on a form as an expression, I am stuck.
Thoughts? Any help is greatly appreciated.
Thanks in advance.
I do acknowledge that it is generally a BAD IDEA to try to store calculated
values in tables. I have also seen that sometimes it can be okay to do this
in certain circumstances.
I am soliciting advice for a project I am working on.
I have built a "Margin/Revenue Calculator" that allows a user to input
various costs and determine what revenue is necessary to acheive a certain
margin, or see what margin a certain revenue will generate. Before going
further, I must state that none of these calculations are being stored in a
table. I am only storing the parameters for the calculations (miles traveled,
hourly wage, etc.), and letting Access compute the calculations at run-time.
I am having trouble with a few of my variables. One is an "Employee Benefits
Cost". What state an employee works in, and his current salary rate dictates
what his "Benefits to Salary Ratio" is. For example, a driver in Georgia
making $25,000/year has a benefits cost ratio of roughly 45% (it costs the
company $25,000 + 45% ($11,250) per year to employ this person).
I have a query that calculates this percentage, and I want to be able to
store this percentage in a table (because the values for each calculation
will change). I am needing a "snapshot" of the record and its "declared"
parameters in case an executive needs to view it in the future. I do not
want the user to have to go through the motions of setting a benefits cost
each time they look at a record.
Right now, I can get a text box to reflect this calculation, using the
DLookUp function. But, since I can't bind the text box to a table AND
display the value on a form as an expression, I am stuck.
Thoughts? Any help is greatly appreciated.
Thanks in advance.