Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2007
    Posts
    2

    Exclamation Unanswered: DCount Function with parameter query

    I am currently working with a report. I am pulling many totals from my query.
    I need to pull totals for specified fields and all need to be on the same report.
    I am not experienced with code or SQL statments.

    Currently I need to count total issues that reflect "AG" in a particular field.
    My current statment is,
    =DCount("[DisputeNumber]","qryMonthlyNumbers","[ComplaintType] = 'AG' ").

    How can I make this work with the parameter query?

  2. #2
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    in the query

    AGComplaints:iif([ComplaintType] = "AG",1,0)

  3. #3
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    in the query

    AGComplaints:iif([ComplaintType] = "AG",1,0)

  4. #4
    Join Date
    Nov 2007
    Posts
    2
    Thank you so much!
    In waiting for the reply I found the answer already.
    NOW I have a new issue.
    In the query I have:
    AGTurnaround: IIf(([ComplaintType]="AG")=True,[Turnaround],0)
    This pulls the actual turnaround for AG acounts, but puts a 0 value for non-AG Accounts. However in the report I want to find the Average Turnaround for ONLY AG accounts.
    Any suggestions?

  5. #5
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    IIf(([ComplaintType]="AG")=True,[Turnaround],null)

Posting Permissions

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