Results 1 to 5 of 5
  1. #1
    Join Date
    May 2003
    Posts
    5

    Unanswered: IIF statement or query modification?

    I'm woking on a project that takes the vendor number, allowable amount and amount actually paid and displays the data sorted by vendor and claim number. The problem comes in when an additional requirement to the report was to calc the total due from each vendor and display in the report footer. I had been trying to use the following IIF statement: =IIF(([Vendor])="x",([VendorXTotal])=Sum(AmtPaid)), and naturally it blew up. I also tried to create in the query behind the report two additional parameters based on the AmtField to tally each vendor's total seperatly using the SQL statement: Field Name
    Table Name


    [Vendor.Vendor]="x"

    This approach yielded no data from the query whatsoever. Any words of wisdom? Thanks!

  2. #2
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    let me just comfirm i'm reading you right, you want the put the sum of a field at the bottom of the report?

    if that is the case just add a unbound txtbox to the report and put it's control source as =DSum("[<Fieldname>]","<Query/table name","<Critia>")
    Last edited by m.timoney; 05-02-03 at 08:11.
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  3. #3
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    or if you need it by vender, set up the grouping put a hidden txtbox thats bound the the field you need sum'ing and set the running sum option in the report detail and in the group footer add another txt box that has it's control source set to = [<RunTot Txt Box>]
    Last edited by m.timoney; 05-02-03 at 08:36.
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

  4. #4
    Join Date
    May 2003
    Posts
    5
    Originally posted by m.timoney
    or if you need it by vender, set up the grouping put a hidden txtbox thats bound the the field you need sum'ing and set the running sum option in the report detail and in the group footer add another txt box that has it's control source set to = [<RunTot Txt Box>]
    Thanks! I'll give it a go.

  5. #5
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    let me know if you have any problems
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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