If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#error
I am calculating a field which totals the sum of a report(Charges) and a
subreport(payments). It works fine when there is data in the payment. I get and #error which prints when there is no data in the payment subreport. What is the best why to have the payment subreport return 0(zero) if there are no payments. -- Thanks in advance Stefan |
#2
|
|||
|
|||
Does this help http://www.mvps.org/access/reports/rpt0007.htm
"Stefan" wrote in message ... I am calculating a field which totals the sum of a report(Charges) and a subreport(payments). It works fine when there is data in the payment. I get and #error which prints when there is no data in the payment subreport. What is the best why to have the payment subreport return 0(zero) if there are no payments. -- Thanks in advance Stefan |
#3
|
|||
|
|||
Stefan,
Use the HasData property of the subreport. For example... =Sum([Charges])+IIf([YourSubreport].Report.HasData,[YourSubreport]![YourTotal],0) -- Steve Schapel, Microsoft Access MVP Stefan wrote: I am calculating a field which totals the sum of a report(Charges) and a subreport(payments). It works fine when there is data in the payment. I get and #error which prints when there is no data in the payment subreport. What is the best why to have the payment subreport return 0(zero) if there are no payments. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Backing Database | GOL | General Discussion | 4 | January 28th, 2005 03:32 PM |
Error message different in MDB and MDE | david epsom dot com dot au | General Discussion | 1 | September 21st, 2004 12:47 AM |
Help, i'm gettiing error: Access has encountered a problem and needs to close... | betsy | General Discussion | 0 | September 14th, 2004 08:20 PM |
Expression - calculating running total | Kathy | Running & Setting Up Queries | 26 | June 22nd, 2004 10:14 PM |
Custom Error Messages | DMc2004 | Database Design | 4 | June 11th, 2004 11:16 PM |