simon551
IS-IT--Management
- May 4, 2005
- 249
I'm trying to run this query in mdb. I'm new at this, but it seems like this query should calculate a balance for BalShares. But as it is, it will only produce a balance if there is data in qrySalesSales for the lotID. All of the others return blanks in the calculated fields. Interestingly, the calculation is correct for those fields it calculates. I tried changing the table joins but still no result for the calculated fields unless there is data in qrySalesSales.
Any help would be greatly appreciated.
Thanks in advance.
SELECT tblInventory.LotID, tblInventory.SecID, tblInventory.MgrID, tblInventory.Tckr, tblInventory.Description, tblInventory.Pdate, (([tblInventory.NumShares])-([qrySalesSales.NumSold])) AS BalShares, tblInventory.Price1, ([balShares]*[Price1]) AS Cost1, tblInventory.Price2, ([BalShares]*[Price2]) AS Cost2
FROM tblInventory LEFT JOIN qrySalesSales ON tblInventory.LotID = qrySalesSales.LotID;
Any help would be greatly appreciated.
Thanks in advance.
SELECT tblInventory.LotID, tblInventory.SecID, tblInventory.MgrID, tblInventory.Tckr, tblInventory.Description, tblInventory.Pdate, (([tblInventory.NumShares])-([qrySalesSales.NumSold])) AS BalShares, tblInventory.Price1, ([balShares]*[Price1]) AS Cost1, tblInventory.Price2, ([BalShares]*[Price2]) AS Cost2
FROM tblInventory LEFT JOIN qrySalesSales ON tblInventory.LotID = qrySalesSales.LotID;