My million dollar question:
Any suggestions on how to do the stock on hand calculation after the last stock take, without having previous stocktake figures affecting the outcome of the results?
I imagine that the vba code should check the last date and quantity when a stocktake was done per item (if an item was out of stock on that date, then the value should be "0"), and then use this quantity as a base before any additions or subtractions has to be done.
Tables:
stocktake table = tblstocktake
some of the fields:
stocktakeid
stocktakedate
productid
clientid
Quantity
tblClient
ClientId
tblProduct
ProductId
i have an idea one should use the dLast function
but include the client, stocktakedate and product
Expand|Select|Wrap|Line Numbers
- DLast("Quantity", "tblstocktake", "stocktakeid = ???