Results 1 to 4 of 4
  1. #1
    DSTR3 is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Location
    NYC-North Jersey
    Posts
    22

    DCount and SQL

    I have a DCount statement with a Query. I want to use SQL. How do I do a DCount with SQL?


    The statement
    Dim EOD As Long
    EOD = Nz(DCount("EmpSignedIn", "QueryEOD"), 0)

    The SQL
    SELECT tblEmployees.EmpSignedIN, tblSecurityDetails.SDPrivID


    FROM tblEmployees INNER JOIN (tblJobsEmp INNER JOIN tblSecurityDetails ON tblJobsEmp.JobSecurityID = tblSecurityDetails.SecurityID) ON tblEmployees.EmployeeID = tblJobsEmp.EmployeeID
    GROUP BY tblEmployees.EmpSignedIN, tblSecurityDetails.SDPrivID
    HAVING (((tblEmployees.EmpSignedIN)=True) AND ((tblSecurityDetails.SDPrivID)=96));

    Thanks
    DS

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    didn't you get it already?

  3. #3
    DSTR3 is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Location
    NYC-North Jersey
    Posts
    22
    No I didn't. This DCount seems different from the other one.
    DS

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    what is different? doesn't it return the result which want?

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

Similar Threads

  1. Help with Dcount
    By tozey in forum Programming
    Replies: 1
    Last Post: 08-10-2010, 10:53 AM
  2. DCount realtime
    By Patience in forum Access
    Replies: 2
    Last Post: 06-24-2010, 06:20 AM
  3. Combining Two DCount expressions in one
    By nmodhi in forum Forms
    Replies: 1
    Last Post: 02-26-2010, 10:49 AM
  4. Using count or Dcount
    By ddcook in forum Access
    Replies: 0
    Last Post: 07-22-2009, 03:35 PM
  5. Dcount on report
    By mattbrem in forum Reports
    Replies: 2
    Last Post: 06-06-2009, 01:33 AM

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