Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2011
    Posts
    4

    Unanswered: What is error this function

    What is error this function
    I want to collect 'Manager' + 'Assistant'

    =DCount("*";"az";"rtba='Manager'+'Assistant' And mort='Permanent'")

  2. #2
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    789
    Provided Answers: 1
    Hi

    I assume your Table or Query is call "az", if so then perhaps this will work

    =DCount("rtba","az","(rtba='Manager' OR rtba='Assistant') And mort='Permanent'")

    ??

    MTB

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    doesn't answer your question, no point as Mike has nailed it it

    but be wary of using the + character
    the string concatenantion character inb VB/VBA is & NOT +. although you can use + it can lead to odd results if the underlying data is numeric
    Last edited by healdem; 04-05-12 at 10:41.
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Jan 2011
    Posts
    4

    When you write the function result in an error

    Hello all

    When you write the function result in an error
    Was to remove the file
    I hope my friends Alokada
    Problem in the report
    Attached Files Attached Files

  5. #5
    Join Date
    Apr 2012
    Posts
    3

    Smile Response to question

    Quote Originally Posted by azhar2006 View Post
    What is error this function
    I want to collect 'Manager' + 'Assistant'

    =DCount("*";"az";"rtba='Manager'+'Assistant' And mort='Permanent'")
    Hey pal, the previous answer was good, but I wanted to caveat with something else.

    If you take the strings "a" + "b", then you get "ab". If you want a space in there, you have to explicitly put a space in there. (e.g. "a" + " " + "b")

    BTW, the '&' sign is usually better practice. The + sign works differently with strings and numbers.

Posting Permissions

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