Calculating a value in a form that fills in the original table

J

julostarr

I use a form that has 2 subforms. In one of the subforms I type in a product
number, which automatically brings up the value of that product. Then I tab
over to enter the quantity. I wanted the form to automatically fill in the
total price (quantity x unit price) when I enter the quantity, which I was
able to get it to do by going to properties, but what it doesn't do is fill
that value (total price) into the table that lists the total price. It does
fill it in if I do not have that formula in the form and I just enter the
total price by hand.

Is there anyway to set it up to automatically generate the total price in
the form and also fill it in the original table?
 
F

fredg

I use a form that has 2 subforms. In one of the subforms I type in a product
number, which automatically brings up the value of that product. Then I tab
over to enter the quantity. I wanted the form to automatically fill in the
total price (quantity x unit price) when I enter the quantity, which I was
able to get it to do by going to properties, but what it doesn't do is fill
that value (total price) into the table that lists the total price. It does
fill it in if I do not have that formula in the form and I just enter the
total price by hand.

Is there anyway to set it up to automatically generate the total price in
the form and also fill it in the original table?

Not only does it not fill in the calculated value but it should not
fill it in. Access is a database, not a spreadsheet. Learn to use it
and it will serve you well.

Delete that [Total Price] field from your table.

As long as your table stores the necessary components needed, i.e.
[Qty], [Price], etc., any time you need the calculated result, simply
re-calculate it, in query, or in a form or report's unbound control.

Do not store the result. It's not necessary. It wastes space and if
one of the other component values is subsequently changed the stored
Total result will be wrong.
 

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