Query #1
SELECT ([Device] & " " & [Color]) AS DeviceType, Count([DeviceType]) AS DeviceCount, [LAN Printers].RetireDate
FROM [LAN Printers]
GROUP BY ([Device] & " " & [Color]), [LAN Printers].Device, [LAN Printers].Color, [LAN Printers].RetireDate
HAVING ((([LAN Printers].Device)<>"FAX" And ([LAN Printers].Device)<>"Scanner" And ([LAN Printers].Device)<>"None"));
Query #2
SELECT ([Device] & " " & [Color]) AS DeviceType, Count(([DeviceType])) AS IssueCount, Sum(qryDowntimeTotal.DowntimeHours) AS SumOfDowntimeHours
FROM [LAN Printers] INNER JOIN qryDowntimeTotal ON [LAN Printers].[Serial No] = qryDowntimeTotal.[Serial No]
GROUP BY ([Device] & " " & [Color]);
DowntimeTotal Query:
PARAMETERS [Beginning Date mm/dd/yy] DateTime, [Ending Date mm/dd/yy] DateTime;
SELECT [Site Information].[Site Name], [LAN Printers].Mfg, Downtime.HeatTicketNo, [LAN Printers].RetireDate, [LAN Printers].Model, [LAN Printers].Printer, Downtime.[Serial No], Downtime.IssueDateTime, Downtime.Issue, Downtime.ResolveDateTime, Downtime.Resolution, Downtime.[Resolved by], WorkingHrs([IssueDateTime],[ResolveDateTime],#12/30/1899 8:0:0#,#12/30/1899 17:0:0#,23456) AS DowntimeHours
FROM [Site Information] INNER JOIN ([LAN Printers] INNER JOIN Downtime ON [LAN Printers].[Serial No] = Downtime.[Serial No]) ON [Site Information].[Site Name] = [LAN Printers].Site
WHERE ((([LAN Printers].Mfg)<>"None") AND (([LAN Printers].RetireDate)>=[IssueDateTime] Or ([LAN Printers].RetireDate) Is Null) AND ((Downtime.IssueDateTime)>=[Beginning Date mm/dd/yy] And (Downtime.IssueDateTime)<[Ending Date mm/dd/yy]+1) AND ((Downtime.ResolveDateTime) Is Not Null));
|