Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    DCount Function (2K2)

    I am trying to use the DCount Method with three conditions in the criteria. I want to count the field ClientID from the table Client where Received = -1 AND Lapsed = -1 AND Corporate = -1. Received, Lapsed & Corporate are Check Boxes.

    Can anyone help me with this?
    Easy Access

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DCount Function (2K2)

    <code>DCount("ClientID", "Client","Received = True And Lapsed = True And Corporate = True")</code>

    That assumes that what you're counting is the records where all three values are true.
    Charlotte

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: DCount Function (2K2)

    In a query, you would use (assuming that the check box Received is bound to a Yes/No field named Received)

    MyCount: DCount("ClientID", "Client", "Received And Lapsed And Corporate")

    where MyCount is the name you want the calculated field to have. In the Control Source of a text box on a form or report, you would use

    =DCount("ClientID", "Client", "Received and Lapsed And Corporate")

  4. #4
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: DCount Function (2K2)

    Thank you Hans & Charlotte...that both of your solutions worked for me.
    Easy Access

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •