Two different criterias

jtbrown1955

Registered User.
Local time
Today, 13:47
Joined
May 28, 2005
Messages
17
I want to pull a report that shows units that are down in a specific time frame AND units that are already down outside that time frame IF the TimeOn field is null. Below is how the query is set up. It is pulling any nulls outside the time frame (which is what I want) but it is also pulling ALL nulls outside the time frame (which is what I do not want). In other words, I want units that are down and back on inside the specified time AND units that are still down no matter how long. Please help. Thank you.

SELECT DowntimeLog.Area, DowntimeLog.UnitName, DowntimeLog.TimeDown, DowntimeLog.TimeOn, DowntimeLog.Operator, DowntimeLog.Notes, DowntimeLog.Reason, DowntimeLog.TimeArrived
FROM DowntimeLog
WHERE (((DowntimeLog.Area) Like "BGS") AND ((DowntimeLog.TimeDown) Between [Type the beginning date and time:] And [Type the ending date and time:])) OR (((DowntimeLog.Area) Like "BGS") AND ((DowntimeLog.TimeOn) Is Null))
ORDER BY DowntimeLog.TimeDown;
 

Users who are viewing this thread

Back
Top Bottom