Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009

    Unanswered: Help on counting "if" in Access

    I am NOT a DB person, just create my own using the canned product. I am trying to create a chart using totals, which is easy, except that I want to divide the totals by certain numbers depending on certain things. I went into the design view and tried the following in a blank column:

    Expr1: IIf([Error Source]="HR",((COUNT([Error Source]))/800)),IIf([Error Source]="Payroll",((COUNT([Error Source]))/800)),IIf([Error Source]="Retail Manager",((COUNT([Error Source]))/500)))

    I got an error about quotation marks needing to be around all text. I am not sure that the expression would work anyway. I was going to try using the Totals Row as "Count", but couldn't figure how to get that count figure into my IIF expression.

    Hope this makes sense- first time I have posted.

  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    Check those brackets! lol


    Expr1: IIf([Error Source]="HR",COUNT([Error Source])/800,IIf([Error Source]="Payroll",COUNT([Error Source])/800,IIf([Error Source]="Retail Manager",COUNT([Error Source])/500)))
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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