Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IIF statement in a Report (97)

    I have a report that has a field "bookcontract" where the entry is either a "book" or "contract" In the report footer I want a grand total of books and a grand total of contracts. This is the formula I am using in the Report footer - =IFF([bookcontract]) = "Book", count([bookcontract]),""). I want it to count how many books. It isn't giving me anything. If I change "Book" to "Contract", I get a count of both books and contracts. Is there a formula that can count how many are books and how many are contracts?

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IIF statement in a Report (97)

    use this as control source of your textboxes:
    <pre>= Sum(IIf([bookcontract] = "Book",1,0))
    = Sum(IIf([bookcontract] = "Contract",1,0))</pre>

    Francois

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IIF statement in a Report (97)

    Try:
    =DCount("[bookcontract]","your qry or table name on which the report is based","[bookcontract]='book'")

Posting Permissions

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