Hello, I Am using this SQL query.
Code:
SELECT DataT.TNo, DataT.SensorSN, DataT.TestedDate, DataT.Pass, DataT.Initial, DataT.Readings
FROM DataT
WHERE (((DataT.TestedDate) Between DateSerial(Year(Date()),Month(Date())-1,1) And DateSerial(Year(Date()),Month(Date())+1,0)))
GROUP BY DataT.TNo, DataT.SensorSN, DataT.TestedDate, DataT.Pass, DataT.Initial, DataT.Readings
HAVING (((Sum(DataT.Pass))=False))
ORDER BY DataT.TNo;
However, when i run the query it will show the 1st instance of a fail regardless of a pass. Pass is -1 and 0 is false
How i want it work, is i have multiple runs of the same unit i run it until i get a pass in most instances i never get a pass and that is what i want to show. If a unit never passes then show the details within the last 2 months.
Any help would be much appreciated.