From: eric.neg on
Hello all!

I'm looking to allow a user to edit some values that are initially pulled
from a table, but I do not want those table values updated.

Reasoning:
The form pulls the number of hours a job will take and a cost per hour then
calculates the total cost. Usually both of pulled numbers can be reduced for
a discounted total cost. I'm trying to allow the user to calculate what the
discounted rate would be.

What I've Done So Far:
I've tried assigning the boxes to the fields, but then any changes are
reflected in the tables. I've tried setting the values as TempVars as the
form loads but then the boxes are locked and can't be changed.

I feel like I'm missing something really obvious. Any thoughts?
From: PieterLinden via AccessMonster.com on
eric.neg wrote:
>Hello all!
>
>I'm looking to allow a user to edit some values that are initially pulled
>from a table, but I do not want those table values updated.
>
>Reasoning:
>The form pulls the number of hours a job will take and a cost per hour then
>calculates the total cost. Usually both of pulled numbers can be reduced for
>a discounted total cost. I'm trying to allow the user to calculate what the
>discounted rate would be.
>
>What I've Done So Far:
>I've tried assigning the boxes to the fields, but then any changes are
>reflected in the tables. I've tried setting the values as TempVars as the
>form loads but then the boxes are locked and can't be changed.
>
>I feel like I'm missing something really obvious. Any thoughts?

I suppose you could leave the form unbound and then load the form with a
record through code... Something like... open a filtered recordset containing
a single record, and then set the values of the controls on your form by
referencing the fields/index of the recordset's fields collection. Then you
should be able to do calculations and nothing will be saved to the source
table, because the form is not bound.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201005/1