Sum Expression

B

Barnie

I am doing a stock control database and am having trouble finding the right
expression to use. I am trying to do a query that will show on a form the
amount of values from all records under a certain reference. For instance,
ref: 1020 (being a carpet) may have four different sizes of the same product
in stock (20 sq metres, 8 sq metres, 15 sq metres and 23 square meters) and I
need it to display how many sq metres in total for this product. I also need
it to automatically update as I change the stocks. Can anyone help?
 
T

tezza

Hi,
Hope i've understood this properly.
Use the totals icon on the toolbar, this will add another row on your query
grid saying 'Group by'. You need to 'Group by' the reference code and then
ensure that it says 'Sum' under the metres column. This will group together
all refs and give you a total of all the metres. e.g. Ref: 1020 Metres 66 etc
etc.
 
Top