N
new2access via AccessMonster.com
i have this SQL code on my query to display training schedule records on the
current year and month..it works fine but i want also to query records with
NULL values on my date field (NTS_Month).
So the query should display all training schedule records from the current
year, current month and all records with null values because we want these
null records to schedule for a training.
Code:
SELECT Schedule.ID, Schedule.TraineeID, Schedule.NTS_Month, Trainees.LastName,
Trainees.FirstName, Trainees.JobTitle, Trainees.SupervisorContactNo
FROM Trainees INNER JOIN Schedule ON Trainees.TraineeID = Schedule.TraineeID
WHERE (((Year([NTS_Month]))=Year(Now())) AND ((Month([NTS_Month]))=Month(Now()
)));
In addition to current year+month+null values, can i query it with the
current date? so it will come current year+current month+CURRENT DATE+null
values. it will display records from this day up to end of this month.
Thanks!
current year and month..it works fine but i want also to query records with
NULL values on my date field (NTS_Month).
So the query should display all training schedule records from the current
year, current month and all records with null values because we want these
null records to schedule for a training.
Code:
SELECT Schedule.ID, Schedule.TraineeID, Schedule.NTS_Month, Trainees.LastName,
Trainees.FirstName, Trainees.JobTitle, Trainees.SupervisorContactNo
FROM Trainees INNER JOIN Schedule ON Trainees.TraineeID = Schedule.TraineeID
WHERE (((Year([NTS_Month]))=Year(Now())) AND ((Month([NTS_Month]))=Month(Now()
)));
In addition to current year+month+null values, can i query it with the
current date? so it will come current year+current month+CURRENT DATE+null
values. it will display records from this day up to end of this month.
Thanks!