Results 1 to 3 of 3
  1. #1
    dwilson is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2011
    Location
    Indianapolis
    Posts
    22

    DCOUNT function with IN statement

    DCOUNT with IN Statement
    I have a report where I use numerous DCOUNT functions, and it works fine. But now I need another report which has multiple conditions, and I can't seem to find examples anywhere to get my syntax right. For this example, the field 1 ENJOY in table CONGSITEALL needs to pull out the number of entries for the answer Yes, Definitely, and Most of the Time. I have tried putting the quotes, etc into diffeent places but I just can't seem to find the right combination.

    =DCount("[1 ENJOY]","CONGSITEALL","[1 ENJOY] IN ('''Yes, Definitely','Most Of The Time'")

    Once I get an answer I will document this so I will know how to do it in the future.


  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    =DCount("[1 ENJOY]","CONGSITEALL","[1 ENJOY] IN ('Yes', 'Definitely','Most Of The Time')")

  3. #3
    dwilson is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2011
    Location
    Indianapolis
    Posts
    22

    DCOUNT function in report with IN statement

    That's it! Thank you so much!!

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

Similar Threads

  1. DCount and If
    By Madmax in forum Access
    Replies: 3
    Last Post: 07-28-2011, 06:53 AM
  2. Using a date range with Dcount function
    By mleberso in forum Reports
    Replies: 4
    Last Post: 06-17-2011, 08:56 AM
  3. DCount function problem
    By 10 Gauge in forum Forms
    Replies: 5
    Last Post: 02-28-2011, 02:08 PM
  4. using the and function in a dlookup statement
    By englisap in forum Programming
    Replies: 10
    Last Post: 01-10-2011, 09:53 PM
  5. DCount and SQL
    By DSTR3 in forum Queries
    Replies: 3
    Last Post: 12-06-2010, 03:07 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