Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello I have this in a text control on a report:

    DCount("[rk]","qRisks","[crn] = '" & [crn] & "'") it works fine but I want to insert an and condition into so it counts when RK is "stringexample" to. Any help would be appreciated.


    Thanks, Darren

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You can specify multiple conditions like this:

    =DCount("rk","qRisks", "crn='" & [crn] & "' AND rk='stringexample'")

    It's important to keep track of the single and double quotes - mismatches lead to syntax errors or to unexpected results.

  3. #3
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='781887' date='26-Jun-2009 13:54']You can specify multiple conditions like this:

    =DCount("rk","qRisks", "crn='" & [crn] & "' AND rk='stringexample'")

    It's important to keep track of the single and double quotes - mismatches lead to syntax errors or to unexpected results.[/quote]


    Thanks Hans, I was getting the doubles and singles wrong!

Posting Permissions

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