Hi John,
Glad to hear the full-disclosure helped.
Thanks for letting me know we're "good to go" on the qryTruckTareAvg subquery results. I typed a post earlier today and must have hit "preview" instead of "submit". 
Your solution looks so much more efficient than the attempts I've made. On qryNetPounds I'm sorry that I did not mention that the tare date is not always the same as the harvest date. For each harvest date for each truck we use the most recent tare weight. Does that make sense?
In looking at the following statement:
qTFC.HarvestDate = qTTA.TareDate
As is, the query does not return all the results it should. When I remove the above statement, too many results are returned. I think (look out
) that the pkFieldPlotCropID may pull the results I need. However, it is only in qryTruckFieldCrops and NOT in qryTruckTareAvg.
I'm going to keep working on this. Any ideas on what to do are surely appreciated.
Thanks,
Sue
Glad to hear the full-disclosure helped.


Your solution looks so much more efficient than the attempts I've made. On qryNetPounds I'm sorry that I did not mention that the tare date is not always the same as the harvest date. For each harvest date for each truck we use the most recent tare weight. Does that make sense?
In looking at the following statement:
qTFC.HarvestDate = qTTA.TareDate
As is, the query does not return all the results it should. When I remove the above statement, too many results are returned. I think (look out

I'm going to keep working on this. Any ideas on what to do are surely appreciated.
Thanks,
Sue
Hi Sue,
To begin with, let me say you've done an excellent job of full-disclosure!
Secondly, regarding qryTruckTareAvg I finally realized after I thought about it that it would in fact give you the same results with either table reference in the subquery, so thanks for confirming that with concrete evidence.
Well, this latest issue is actually pretty simple, as it turns out (famous last words). We should be able to take care of it in 2 steps:
- Add fkTruckID as a column in your qryTruckFieldCrops query
- qryNetPounds will be like this:
HTH,Code:SELECT HarvestDate, txtTruckNo, ([Sum of TotalWeight] - [Count of tblTruckFieldCrops]*[RunningAvg_TWeight]) AS NetPounds FROM qryTruckFieldCrops qTFC INNER JOIN qryTruckTareAvg qTTA ON qTFC.fkTruckID = qTTA.fkTruckID AND qTFC.HarvestDate = qTTA.TareDate;
John
Last edited: