Results 1 to 4 of 4

Thread: Dcount (2000)

  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dcount (2000)

    Hi, I am having problems getting dcount to return the value I need. My code is =DCount("[contract group]","QryCCReports","[Question Level]"='foundation' And [contract group]='life')

    contract goup is a field in the query "QryCCReports" as is question level. I am looking to return value to show the number of entries where the contract group field = life and where the question level field = "foundation".

    Kind regards Darren.

    I have tinkered around but can't seem to get it right.

    Many thanks Darren.

  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 (2000)

    You have a double quote after [Question Level] that shouldn't be there. Move that to the end of the expression after [contract group]='life' and the code should work.
    Charlotte

  3. #3
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dcount (2000)

    Thank you Charlotte that fits the bill rather nicely. I do constantly have problems with where to put ' or " and when, even when I follow the help examples. Can you guide me on any quick easy reference resources available?

    Thanks Darren.

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

    Re: Dcount (2000)

    Just keep in mind that the entire criteria expression is a string. That means that if you embed single quotes around hard coded values, you have to wrap the whole thing in a pair of double quotes. If you cancatenate values to the string, you have to put double quotes around the strings being concatenated.
    Charlotte

Posting Permissions

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