Results 1 to 6 of 6
  1. #1
    www is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    17

    dCOUNT HELP


    I am using dCount in a text bot and I want a count of "Member" and "Added to membership" from my query.



    =DCount("MailingID","q_Directive_track_NOVs","(Ord er_Response = ‘Member’ OR Order_Response = ‘Added to membership’)")

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    Looks okay. What happens - error message, wrong result, nothing?

    The inner pair of parens are not needed but should not hurt.
    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
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    =DCount("MailingID","q_Directive_track_NOVs","[Order_Response] = ‘Member’ OR [Order_Response] = ‘Added to membership’")

  4. #4
    www is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    17
    Thanks for the responses. I am still getting #Error in the text box though.

  5. #5
    www is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    17
    Got it to work:

    =DCount("MailingID","q_Directive_track_NOVs","[Order_Response] = 'Member' OR [Order_Response] = 'Added to membership'")

    Thanks for the help!!!

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    Now I can see the original code has 'smart' single quotes. Did replacing them resolve? How did they get in there to begin with?
    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. Another DCount
    By Thompyt in forum Programming
    Replies: 5
    Last Post: 01-18-2019, 04:30 PM
  2. DCount Help
    By mpaulbattle in forum Queries
    Replies: 3
    Last Post: 11-21-2016, 11:42 AM
  3. DCount help
    By McArthurGDM in forum Programming
    Replies: 6
    Last Post: 06-15-2015, 04:30 PM
  4. DCount
    By nsteenhaut in forum Queries
    Replies: 2
    Last Post: 10-04-2011, 05:00 PM
  5. DCount and If
    By Madmax in forum Access
    Replies: 3
    Last Post: 07-28-2011, 06:53 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