Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm new to Access & need some help summing fields from different tables.
I have 3 tables:
Table Fields
Products: Prod Name, Opening stock
Supplies: Prod Name, quantity received,date
Sales: Prod name, quantity sold, dateThe Supplies & Sales tables can have many lines for the same product.
On a form for new sales orders I want to state current stock held. I have produced queries which display opening stock, Total quantity received and Total sales for each product, but I want to display for a given product:
Opening stock + Total deliveries -Total salesHow can I do this calculation? Should I produce a query that refers to the other 3 queries? Or can I have a form with a combo box top select the product and then use an expression to add up the 3 components of the sum?
Thanks
Cliff

Cliff
You can do calculations inside a textbox so it displays the result.
So place a textbox on your form, open the properties window for the textbox and type the following in the property "Controlsource":=[Opening stock] + [Total deliveries] -[Total sales]
Don't forget the "=" sign and between the brackets are the fieldnames of the query that is assigned to the form.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |