I have two querys, one pulls the most recent date for training and when run by itself includes nulls. However, on the next query I am adding a year to the most recent training to create a due date and selecting only those dates that are less than today. (To see who is due for annual training.) But now it doesn't include the null dates. Here is the SQL:
SELECT qrySafety.MostRecent, qrySafety.Training, DateAdd("y",1,[qrySafety]!MostRecent) AS [Due Date], [Last Name] & ", " & [First Name] AS [Full Name], [Workers].Active, [Workers].Department, [Series Codes].Facility, [Workers].RAM
FROM (qrySafety INNER JOIN [Workers] ON qrySafety.[Employee ID] = [Workers].ID) INNER JOIN [Series Codes] ON [Workers].[Series Code] = [Series Codes].[Series Code]
WHERE ((([Workers].Active)=Yes) AND (([Workers].RAM)=No) AND ((DateAdd("y",1,[qrySafety]![MostRecent]))<=DateAdd("m",-1,Date())));
Any pointers greatly appreciated!
SELECT qrySafety.MostRecent, qrySafety.Training, DateAdd("y",1,[qrySafety]!MostRecent) AS [Due Date], [Last Name] & ", " & [First Name] AS [Full Name], [Workers].Active, [Workers].Department, [Series Codes].Facility, [Workers].RAM
FROM (qrySafety INNER JOIN [Workers] ON qrySafety.[Employee ID] = [Workers].ID) INNER JOIN [Series Codes] ON [Workers].[Series Code] = [Series Codes].[Series Code]
WHERE ((([Workers].Active)=Yes) AND (([Workers].RAM)=No) AND ((DateAdd("y",1,[qrySafety]![MostRecent]))<=DateAdd("m",-1,Date())));
Any pointers greatly appreciated!