Allow Temporary Edits In Form To Table Values

E

eric.neg

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?
 
P

PieterLinden via AccessMonster.com

eric.neg said:
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.
 

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