Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2013
    Posts
    2

    Unanswered: creating a SUM, IF, COUNT statement

    I am having major problems trying to create either a single or joint statement that would identify a named sales person from a list of other sales person look across at their price column then add (sum) only the totals that sales person has sold along with counting how many vehicles they have sold.

    I have tried this

    =sum(iif([sales_person]="Jeff",sum([price]) - this does not work so I am trying to see where I have gone wrong before trying to get the count section in even if it requires me to create a new statement.

    Please help - my computer may take a flight if I don't get this right.

    By the way I might just be stupid and can't see my errors or the logic sorry

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    1. An argument is missing. The syntax of the IIf() function is:
    Code:
    IIf(<Condition>, <Value when condition is True>, <Value when Condition is False)
    2. Where do you try to use such expressions? If it's on a form, use:
    Code:
    = DSum("price", "TableName", "sales_person='Jeff'")
    Have a nice day!

  3. #3
    Join Date
    Apr 2013
    Posts
    2
    Thanks Sinndho, I am trying to use this expression in Access report - having tried researching via the internet but to no avail.

    I will try your suggestion and see if it works.

Tags for this Thread

Posting Permissions

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