Saving values from calculated controls into database

A

Ashu

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
 
R

Rick Brandt

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.
 

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