Question : Access 2K / 2003 bug?

In Access 2000 I would do a Dcount("*","qry") and it would return the number of rows. In Access 2003 it allways returns a 0.
Is this a bug in Access (if so which one?) or in my code? Is there another way of doing this?

qry = the query I attached bellow
Code Snippet:
1:
2:
3:
4:
5:
SELECT tblLotDetail.StorageLocation AS Location, Sum(tblLotDetail.Cases) AS Cases, Last(tblLotDetail.PaletteID) AS PaletteID, Last(tblLotDetail.LotHeaderID) AS LastOfLotHeaderID, Last(tblLotHeader.CustomerItemID) AS CustomerItemID
FROM (tblLotDetail LEFT JOIN tblMovingLocationsTemp ON tblLotDetail.StorageLocation = tblMovingLocationsTemp.Location) LEFT JOIN tblLotHeader ON tblLotDetail.LotHeaderID = tblLotHeader.ID
WHERE (((tblLotDetail.LotHeaderID)=[forms]![frmMovingLocations]![frmsubmovinglocations]![LotHeaderID]) AND ((tblMovingLocationsTemp.Location) Is Null))
GROUP BY tblLotDetail.StorageLocation
ORDER BY tblLotDetail.StorageLocation;

Answer : Access 2K / 2003 bug?

when run your query, do you see records returned?
is the form frmMovingLocations open?

try changing this

[forms]![frmMovingLocations]![frmsubmovinglocations]![LotHeaderID]

to

[forms]![frmMovingLocations]![frmsubmovinglocations].Form![LotHeaderID])
Random Solutions  
 
programming4us programming4us