Results 1 to 5 of 5
  1. #1
    Newbie11 is offline Advanced Beginner
    Windows 2K Access 2003
    Join Date
    Dec 2011
    Posts
    41

    DCount with Multiple Criteria


    I have the following control souce for a text boxt that I just can't seem to get to function correctly :

    =DCount("[Facility]"," qry_Placement ","[ Facility] = 'Denied' And [AdmitFacility] <> ' Non-Collaborative Facility'")

    Essentially I would like to have the database find the Facility field in qry_Placement where the field is equal to Denied and where the AdmitFacility field is equal to Non-Collaborative Facility. All the fields I am working with are text only. I'm not sure what I'm doing wrong.

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,774
    Looks okay but for all the extraneous spaces. Does this work?

    =DCount("[Facility]","qry_Placement","[Facility] = 'Denied' And [AdmitFacility] <> 'Non-Collaborative Facility'")
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is online now Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    2,940
    It could just be a typo, but you have space in the first criteria before Facilty: [ Facilty] instead of [Facilty]
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    Newbie11 is offline Advanced Beginner
    Windows 2K Access 2003
    Join Date
    Dec 2011
    Posts
    41
    Thanks for the extra sets of eyes!!! I don't know how I didn't catch that!

  5. #5
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,774
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 05-18-2012, 11:59 AM
  2. How do you use DCOUNT for multiple criteria?
    By wwhit in forum Programming
    Replies: 5
    Last Post: 05-15-2012, 11:14 AM
  3. Replies: 1
    Last Post: 07-13-2011, 11:00 AM
  4. multiple dcount update query
    By slothnet in forum Programming
    Replies: 5
    Last Post: 08-24-2010, 03:44 PM
  5. Mask for dcount criteria
    By akbigcat86 in forum Programming
    Replies: 3
    Last Post: 08-09-2010, 11:00 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 - Senior Forums