I have a form that uses qryPartEdit to display most of the information, and uses another query (qryLastStockTake) to get some more details. Yet if there is no data in the record for qryLastStockTake I do not get any results. I've tried to change the INNER join to LEFT, but that join is not supported.
Here is the sql:
I want to display the MasterNum, Item, FullBinLoc, Category, WinterLevel, SummerLevel, CurrentStock, and Last Stock Take (MaxOfTransDate).
How can I get a record to display even if a field is null or empty?
Thanks.
Here is the sql:
Code:
SELECT [T-Parts].MasterNum, [T-Parts].Item, [T-Parts].CategoryID_FK, [T-SupplierPartNums].PartNumber, [T-SupplierPartNums].Barcode, Sum([Quantity]*[Result]) AS [Current Stock], [T-Parts].Attachment, [T-Warehouses]![WarehouseName] & " " & [T-Bins]![BinName] AS FullBinLoc, [T-Parts].WinterLevel, [T-Parts].SummerLevel, [T-Parts].Discontinued, [Q-LastStockTake].MaxOfTransDate
FROM [T-Warehouses] INNER JOIN ((([T-Categories] INNER JOIN ([T-TransTypes] INNER JOIN (([T-Bins] INNER JOIN ([T-Parts] INNER JOIN [T-PartLocations] ON [T-Parts].MasterNum = [T-PartLocations].[MasterID_FK]) ON [T-Bins].BinID = [T-PartLocations].BinID_FK) INNER JOIN [Q-LastStockTake] ON [T-Parts].MasterNum = [Q-LastStockTake].MasterNum) ON [T-TransTypes].TransTypeID = [Q-LastStockTake].TransTypeID) ON [T-Categories].CategoryID = [T-Parts].CategoryID_FK) INNER JOIN [T-SupplierPartNums] ON [T-Parts].MasterNum = [T-SupplierPartNums].MasterID_FK) INNER JOIN [T-Transactions] ON ([T-Parts].MasterNum = [T-Transactions].MasterNumID) AND ([T-TransTypes].TransTypeID = [T-Transactions].TransTypeID)) ON [T-Warehouses].WarehouseID = [T-Bins].WHID_FK
GROUP BY [T-Parts].MasterNum, [T-Parts].Item, [T-Parts].CategoryID_FK, [T-SupplierPartNums].PartNumber, [T-SupplierPartNums].Barcode, [T-Warehouses]![WarehouseName] & " " & [T-Bins]![BinName], [T-Parts].WinterLevel, [T-Parts].SummerLevel, [T-Parts].Discontinued, [Q-LastStockTake].MaxOfTransDate, [Q-LastStockTake].MasterNum
HAVING ((([T-Parts].MasterNum)=[TempVars]![tmpMaster]));
I want to display the MasterNum, Item, FullBinLoc, Category, WinterLevel, SummerLevel, CurrentStock, and Last Stock Take (MaxOfTransDate).
How can I get a record to display even if a field is null or empty?
Thanks.