| Re: Is anyone a demon in MS Access?
Im guessing you want to group the same product names together and total the quantity and price fields, you can do that in a query like:
SELECT Product, Sum(Qty) AS TotalQty, Sum(Price) AS TotalPrice FROM <TableName> GROUP BY Product;
...or another way of getting the same output would be to...
Go to the query sidetab click New
Add the table to the query
Click "Totals" (on the iconbar, its the Sigma button)
You then get an extra row (called "total") at the bottom
Double-click the Product field, Qty field and Price field so they appear at the bottom
They should all have a "total" calue of "Group By". Leave that for Product (as youre grouping by product code), change "total" for Qty and Price fields to "Sum" (add grouped items together).
You can then click "View" to see the contents of the query, or change it to a Make Table query to make a new table. I recommend saving this as a query as it will change with the products table, it helps you to keep your data in sync and will behave just like a table for most things you want to do with it (except you cant edit it).
Hope this helps,
Jas.
|