NULL function is not working for me

P

pht204

I am trying to run a query with tblEmployee and tblDeactivateDate.
tblDeactivateDate contains date and time of an employee when he/she
parts from the company. The query should give me all employees, who
are still working for me (in other words. DeactivateDate is empty
field). when I query both tables and put my parameter for
tblDeactivateDate is NULL, I still get a list of those with their dates
in my result. what gives? is there another way to check why this is
not working?
 
K

Keith W

I am trying to run a query with tblEmployee and tblDeactivateDate.
tblDeactivateDate contains date and time of an employee when he/she
parts from the company. The query should give me all employees, who
are still working for me (in other words. DeactivateDate is empty
field). when I query both tables and put my parameter for
tblDeactivateDate is NULL, I still get a list of those with their dates
in my result. what gives? is there another way to check why this is
not working?
Is this a stored query or on executed in VBA code?

Keith.
www.keithwilby.com
 
R

RobFMS

SELECT
tblEmployee.EmployeeID,
tblEmployee.EmployeeName,
tblDeactivateDate.DeactivateDate

FROM
tblEmployee INNER JOIN tblDeactivateDate
ON tblEmployee.EmployeeID = tblDeactivateDate.EmployeeID

WHERE
tblDeactivateDate.DeactivateDate Is Null;


Does this help?
--
Rob Mastrostefano

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com
 
J

John Vinson

I am trying to run a query with tblEmployee and tblDeactivateDate.
tblDeactivateDate contains date and time of an employee when he/she
parts from the company. The query should give me all employees, who
are still working for me (in other words. DeactivateDate is empty
field). when I query both tables and put my parameter for
tblDeactivateDate is NULL, I still get a list of those with their dates
in my result. what gives? is there another way to check why this is
not working?

Care to give us a little help here? You can see your query; we cannot.
Please open it in SQL view and post the SQL text here.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top