Results 1 to 2 of 2
  1. #1
    trident is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    141

    Use Count with multiple criteria

    I have created a split form, where all the details are found on the bottom.



    The details are as follows:

    Database - emaildb
    Status - 33-Active, 34-Inactive
    CustomerSupplier - 1-Customer, 2-Supplier
    Unique Number - ID

    I have made a text box with the following details:

    =Count(IIf([emailstat]=33,0) And IIf([suppliercustomer]=1,0))

    This works like a charm but it counts the whole list, and not the active/customer only.

    If I put ID after count as below:

    =Count([ID],IIf([emailstat]=33,0) And IIf([suppliercustomer]=1,0))

    an error appears "THE EXPRESSION YOU ENTERED HAS A FUNCTION CONTAINING THE WRONG NUMBER OF ARGUMENTS".

    can you please assists me on this.

    thank you.

    Trident

  2. #2
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,142
    Use a Dcount()

    DCount("ID","YourTableName","[EmailStat] = 34 AND [SupplierCustomer] = 1")
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

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

Similar Threads

  1. Replies: 3
    Last Post: 08-09-2016, 01:52 PM
  2. Count Records with Multiple Criteria
    By khart12 in forum Queries
    Replies: 13
    Last Post: 02-10-2015, 04:50 PM
  3. Report summary count with multiple criteria
    By crimedog in forum Reports
    Replies: 1
    Last Post: 09-19-2014, 01:33 PM
  4. Replies: 2
    Last Post: 07-29-2012, 05:52 PM
  5. Replies: 2
    Last Post: 05-09-2011, 06:45 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