Solved Where is wrong in this small query? (1 Viewer)

Ashfaque

Student
Local time
Today, 09:24
Joined
Sep 6, 2004
Messages
894
I am fetching up some records in a subform thru a query:

Code:
SELECT T_JobOffer.CNo, T_JobOffer.CDept, T_JobOffer.CName, T_JobOffer.CLastWorkingDate
FROM T_JobOffer
WHERE (((T_JobOffer.CNo)<>IsEmpty("Cno")) AND ((T_JobOffer.CDept)=[forms]![F_SaudizationPercent]![TxtDeptEmp]) AND ((T_JobOffer.CLastWorkingDate)<>IsMissing([CLastWorkingDate])));

It is working properly and producing list of employees who has left the company because their CLastWorkingDate is entered.

But when I want those who are currently present in the company means their CLastWorkingDate is null, it is not working. It tried just removing <> that I mentioned before IsMissing([CLastWorkingDate]) condition.

Is there any other way?
 

Ashfaque

Student
Local time
Today, 09:24
Joined
Sep 6, 2004
Messages
894
It solved...I just tried with "Is Null" and not used IsNull which appeares in SQL design and worked...

Thanks,
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 23:54
Joined
Feb 19, 2002
Messages
43,293
Your query used IsEmpty() rather than IsNull(). I think IsEmpty() only works with objects so you would never use it in a query. Is Null is the proper SQL equivalent though.
 

Users who are viewing this thread

Top Bottom