Help urgently needed!

A

Ann Shaw

Hi I am working on an Access database and I have a table
with Sales information. Some of the fields have pricing
and I have a form that I use to enter my sales info. This
info obviously stores in my original table.
I also have a calculation on my form to give me a total
price but this is not in my table. Every time I want to
query something I have to do a calculation in my query.
Is it possible to have the calculation that is on my form
go back somehow to store in my table? I have included a
total price field in my table but it doesn't automatically
update. I was thinking of some sort of update query??

Thanks in advance

Ann (Dublin, Ireland)
 
J

JohnFol

You could base the form on a query, and have the calculation done there ..
Then, base all your forms / reports on that query.
 
N

Norman Yuan

You should not store calculated value in table, as you've already found that
the total price did not get updated. You did correctly by getting calculated
value from query. Why don't you save your query, so that next time you want
to know those calculated values (like Total Price), you can simply run that
query, and enter a few parameters if necessary. Better yet, you may want to
design one or more forms to take user inputs as query parameters.
 
M

Mike Painter

Ann said:
Hi I am working on an Access database and I have a table
with Sales information. Some of the fields have pricing
and I have a form that I use to enter my sales info. This
info obviously stores in my original table.
I also have a calculation on my form to give me a total
price but this is not in my table. Every time I want to
query something I have to do a calculation in my query.
Is it possible to have the calculation that is on my form
go back somehow to store in my table? I have included a
total price field in my table but it doesn't automatically
update. I was thinking of some sort of update query??

Thanks in advance

Ann (Dublin, Ireland)

Base your forms and reports on a query. There is no need for a total price
field

TotalPrice: [Price] * [quantity] is all you need.

Quantity would be a field in you line item table.
Price would come from your inventory table however this value *may* need to
be inserted into your line item table.
I usually do this with an afterupdate event. Me!LineItemPrice =
Me!InventoryPrice

Frequent price changes are one reason. Infrequent changes and keeping a long
history are another.
 
Top