Get field value from preveious calculated field and save to db

G

Guest

Hi,
I met a problem that how to save the calculated sum in a subform to database.

On my form, I have a subform, and I calculated the total amount on the subform footer area, then add a text box on main form to show the total. The sum in the text box shows correctly. But the sum value of the new text box is not saved in the database, it is just on the form. My question is that how can I save this sum to the database, then I can track this value in the future? (where can I put the total sum field, in the table which the main form based on, or the table the subform based on?)

Thanks!
 
J

Jonathan Parminter

Hi Flora,
to store a value in a database you will need to have a
table that has an appropriate field.

to store the calculated value assign to table field or
bound control.

for example using a calculation for two textboxes that is
stored in third bound textbox:

txtTotal = txtQuantity * txtPrice

Luck
Jonathan

-----Original Message-----
Hi,
I met a problem that how to save the calculated sum in a subform to database.

On my form, I have a subform, and I calculated the total
amount on the subform footer area, then add a text box on
main form to show the total. The sum in the text box shows
correctly. But the sum value of the new text box is not
saved in the database, it is just on the form. My question
is that how can I save this sum to the database, then I
can track this value in the future? (where can I put the
total sum field, in the table which the main form based
on, or the table the subform based on?)
 

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