I have an inventory table with fields of item number, description, etc. One field is "BeginningInventory". I also have a table populated with line items of invoice sales, against which I wrote a query that gives me a sum of the number of sales, "SalesQuantity", by item number.
I want to write a query that will allow subtraction of an item's SalesQuantity from its BeginningInventory so that I can keep a current count. However, when not all items are sold in a particular period, those items with no sales don't appear in the original query. I have written the second query so that all items appear, but the SalesQuantity field is blank, and I cannot do the subtraction to get my quantity remaining. That subtraction results in another blank field on that item. So, I guess what I need is a way to write the original query such that all items appear (which I can do) AND if there are no sales, that value defaults to zero... or something like that.
I don't know why I can't figure this out... it should be easy. Thanks for any help!!!
I want to write a query that will allow subtraction of an item's SalesQuantity from its BeginningInventory so that I can keep a current count. However, when not all items are sold in a particular period, those items with no sales don't appear in the original query. I have written the second query so that all items appear, but the SalesQuantity field is blank, and I cannot do the subtraction to get my quantity remaining. That subtraction results in another blank field on that item. So, I guess what I need is a way to write the original query such that all items appear (which I can do) AND if there are no sales, that value defaults to zero... or something like that.
I don't know why I can't figure this out... it should be easy. Thanks for any help!!!