Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2005
    Location
    Anderson, Indiana, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DCount (2002 SP3)

    I am having trouble-getting DCount to count the number of nulls in a field for a table. It will eventually send out an e-mail to my self when a null is detected in this field. Here is the code I am trying to use. This code results in DCount to be 0 when I know it should be 14.

    DCount("[prod_part_nbr]", "2_tb_prod_part_input", "[prod_part_cyct] = Null")

    I have tried this as well but I get an "Is Null function requires two arguments"
    DCount("[prod_part_nbr]", "2_tb_prod_part_input", "IsNull([prod_part_cyct])")

    Thank You

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

    Re: DCount (2002 SP3)

    DCount will only count records for which the first argument is not null, unless you specify "*" as first argument, then all records satisfying the where-condition in the third argument will be counted. So try

    DCount("*", "2_tb_prod_part_input", "IsNull([prod_part_cyct])")

  3. #3
    2 Star Lounger
    Join Date
    Mar 2005
    Location
    Anderson, Indiana, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DCount (2002 SP3)

    Thank You, works just fine.

Posting Permissions

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