Results 1 to 4 of 4
  1. #1
    alhareri is offline Novice
    Windows 8 Access 2007
    Join Date
    Nov 2014
    Posts
    6

    How to Use Dcount in Form

    hi


    Can you help me to count how many Excuse in field and notExcuse in same field in the form for one employee?

    thanks
    see attachment
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,649
    =Sum(IIf([Excuse]="Excuse", 1, 0))

    =Sum(IIf([Excuse]="NotExcuse", 1, 0))

    If you want to show count for one employee then filter the form to show only that employee records. If you want individual count for each employee then Sum calc in footer would require textboxes for each employee. How many employees?

    =Sum(IIf([EmployeeID="1401" AND [Excuse]="Excuse", 1, 0))

    A domain aggregate (DCount, DSum) could be rather complicated.

    Really should build a report.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    alhareri is offline Novice
    Windows 8 Access 2007
    Join Date
    Nov 2014
    Posts
    6
    thanks a lot

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,649
    Issue resolved?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Dcount records from a filtered form
    By charly.csh in forum Access
    Replies: 6
    Last Post: 11-20-2014, 01:14 PM
  2. Dcount and form not updating.
    By abodi in forum Forms
    Replies: 16
    Last Post: 08-27-2014, 05:51 PM
  3. Dcount results from a form object combobox
    By naeemahmad in forum Programming
    Replies: 2
    Last Post: 11-19-2013, 11:56 AM
  4. DCount in a Form
    By killermonkey in forum Forms
    Replies: 5
    Last Post: 10-29-2013, 11:45 AM
  5. DCount Causing Form to Stall
    By Zerdan in forum Forms
    Replies: 2
    Last Post: 06-01-2011, 11:28 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