Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2005
    Location
    Lancaster PA, USA
    Posts
    33

    Unanswered: trouble subtotaling subreports

    I have a main report that contains three subreports. All three subreports are supplied by select queries, the three subreports may or may not contain data. When one or more does not contain data I get an #error msg for my subtotal. I've been trying to use a combination of the IIf and HasData functions to eliminate this problem but to no avail. Any help would be appreciated

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Have you tried nz() ?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Dec 2005
    Location
    Lancaster PA, USA
    Posts
    33

    somewhat closer

    Yes I've tried the Nz() function, except that if I have more than one total it only picks up the last one. For example if I have:
    srSurroundsBillOfLading2
    Item1 $15
    Item2 $25
    srMiscBillOfLading
    null
    srSpecialtyBillOfLading
    Item3 $40

    I would get a sum of the second and third items and the null (zero) but not the first. And when I try to use the Sum() function with Nz() I get errors.

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    I use this:

    http://www.mvps.org/access/forms/frm0022.htm

    You can use IsNumeric by itself if you don't want to go the function route.
    Paul

  5. #5
    Join Date
    Dec 2005
    Location
    Lancaster PA, USA
    Posts
    33

    almost there

    Thanks, but I don't think thats what I need. Maybe I have the syntax wrong but i'm trying to use nested functions; ex: Nz(Sum([Total1]), 0) If this even works...

Posting Permissions

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