Query All Employees Who Have Not Logged In for the Day

jrsarrat

New Member
Joined
Jul 8, 2018
Messages
29
Greetings!

I have produced a query that shows only the names of employees who have not logged in. But, I want the query to also only give me the employees who have not logged in for the current date = Date().

How do I incorporate that into this query I have already produced :

SELECT *
FROM Emp_tbl AS e
WHERE NOT EXISTS
(select null from tblEmpLogin t where t.pf_id = e.pf_id);

The date field 'DTE' is in table tblLogInOut.

Thank you for your help!
 

Some videos you may like

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
53,746
Office Version
365
Platform
Windows
Your query references table "Emp_tbl" and "tblEmpLogin", but the you say that the date field is in the "tblLogInOut" table.

I think you need to tell us the structure and relationships of all three of these tables (how they relate to each other).
And perhaps post some sample data. I am most interested as to what the data looks like in the table that shows whether or not they have logged in.
 

Watch MrExcel Video

Forum statistics

Threads
1,102,856
Messages
5,489,302
Members
407,686
Latest member
Chuck1960

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top