Saving values from calculated controls into database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form where certain values are calculated (I am using text boxes and
expression ) based on other fields in the form. I would like to save this
values in the actual table. How do I synch the calculated columns to the
actual columns in the table?

I tried to emulate the caculations in the vb code using openrecordset and
..edit, .update etc. but when the .update runs I get an error message which
says 'this record is being updated by someother user' , which is expected how
I do I resolve this?

Thanks,

Ashu
 
Ashu said:
I have a form where certain values are calculated (I am using text boxes and
expression ) based on other fields in the form. I would like to save this
values in the actual table. How do I synch the calculated columns to the
actual columns in the table?

I tried to emulate the caculations in the vb code using openrecordset and
.edit, .update etc. but when the .update runs I get an error message which
says 'this record is being updated by someother user' , which is expected how
I do I resolve this?

Why do you want to save a value that can easily be calculated on the fly? This
violates good database design principles and is just plain unnecessary. If it's
because you want to see the value in your datasheet then build a query based on
your table and add a calculated field using the same expression as you now have
on your form. Then simply use the query every place you are now using the
table.

It will "feel" just like your table except it will have the calculated value in
it.
 
Back
Top