Results 1 to 4 of 4
  1. #1
    ippy is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    3

    null values


    I've got two tables - one with the all my employees in thier teams and a second one with the a record of all the sales and which employees made the sale. How can I produce a report of the the employees with no sales?

    The employees with no sales would not appears in the sales table

    Many thanks

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    select employeeID, name from employee left join tblsale on employee.employeeID=tblsale.employeeid where tblsale.employeeid is null.

  3. #3
    ippy is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    3
    that worked fantastic thanks .... what I'm doing now is trying to include in this formula all of the none sales on certain dates depending on a form value.

    I can get a query to pull off all the sales depending on a date selected in a combo box on a form but when I combine to the two queries it gives blank results

    -how would i add to the above formula to include a it to only display none sales on a certain date. the date would be determined by a combo box value. Sale Date exsists in the sales table

    thanks in advance

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    first, find out all employees that have sale during this period, then exclude them:

    select employeeID, name from employee left join
    ( select employeeid from tblsale where tblsale.saledate between #" & me.fromdate & "# and #" & me.todate & "#" )
    as b
    on employee.employeeID=b.employeeid where b.employeeid is null

Please reply to this thread with any new information or opinions.

Similar Threads

  1. No return on Null values
    By forrestapi in forum Queries
    Replies: 4
    Last Post: 10-18-2010, 08:09 AM
  2. Null Values in query
    By LesleaOH in forum Queries
    Replies: 0
    Last Post: 10-19-2009, 04:45 PM
  3. Fill in Null values
    By Petefured in forum Queries
    Replies: 1
    Last Post: 10-06-2008, 12:54 PM
  4. HELP with NULL DateTime VALUES
    By lfolger in forum Programming
    Replies: 3
    Last Post: 03-28-2008, 02:33 PM
  5. Null Values not showing up in a Query
    By Valli in forum Queries
    Replies: 0
    Last Post: 01-04-2006, 03:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums