Help on query, please


All advices will be appreciated.

I want to create a form listing inventory items, onhand quantites and sales prices.

The items are categorized in a table. Invent2ItemCategory (I 've created. have 2 fields. ItemId and categoryId).

In the form , there is a treeview listing item categories. When the user clicks one (a categoryId is selected) , grids on the right will be filled. When I use a query consisting of two datasources. (Invent2ItemCategory table and InventSum table). Everything is Ok.

One grid displays InventSum datasource. Item Id, Item name and quantity fields are displayed.

Totals for each Item is displayed. I think I have to use a query in order to display sum of fields.

I also want to add sales prices (PriceDiscTable) to the query. In another grid prices will be displayed for the selected Item.


Thanks for any advice.