473,396 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

#Error Message from SubReport

I have a main report that has a subreport to it. On the sub report I
have a running total. If there are no entries in the sub-report source
table the sum total returns the #Error message for the running sum
total.

I want to watch for this on the main report and replace the #Error with
a 0 (Zero) in the control on the main report.

I can not get this to happen. I have tried both an IF statement in VBA
and the IIF in the control itself. Both work fine if there is a value in
the sub-report, but when there is not I get the #Error.

I tried to use IsNull(My Control) to watch for the error but this is not
working.

Anyone know how I do this?

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
7 2400
Michael Charney wrote:
I have a main report that has a subreport to it. On the sub report I
have a running total. If there are no entries in the sub-report source
table the sum total returns the #Error message for the running sum
total.

I want to watch for this on the main report and replace the #Error
with a 0 (Zero) in the control on the main report.

I can not get this to happen. I have tried both an IF statement in VBA
and the IIF in the control itself. Both work fine if there is a value
in the sub-report, but when there is not I get the #Error.

I tried to use IsNull(My Control) to watch for the error but this is
not working.

Anyone know how I do this?


Not too sure about the referencing of the subreport but i use the following
on my report;

=IIf(IsNull(Sum([AbsenceCost])),0,Sum([AbsenceCost]))

Were you using something like this?


Nov 12 '05 #2
Yes that is what I was doing. It does not place a 0 (Zero) in the field
if it returns the #Error.

What else can I do?

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
Michael Charney wrote:
Yes that is what I was doing. It does not place a 0 (Zero) in the
field if it returns the #Error.

What else can I do?

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


I find that with a bit of experimentation you can get that first part of the
IIF correct. At the moment, whatever you have in there is incorrect. Make
sure your reference to the subreport is correct. Check out the page on the
Access Web about correct referencing.
Nov 12 '05 #4
The page on the Access Web? Not sure I know about this. Can you give me
a link?

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #5
Michael Charney wrote:
The page on the Access Web? Not sure I know about this. Can you give
me a link?

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


You could google it or see the FAQ but here it is;

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

This specifc page may be what you need, or click on the Reports link.
Nov 12 '05 #6
Thanks!

This is exactly what I was trying to do!!

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #7
Nothing wrote:
Thanks!

This is exactly what I was trying to do!!

Michael Charney

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Bookmark that site! :)
Nov 12 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: krish_4u_only | last post by:
Hi, I have designed a subreport - record source is on crosstab query. crosstab query is designed on union query. The sub report is working fine when it is opened individually. but if i place it on...
1
by: Kirsty Ryder | last post by:
Hi, I have a Report with a subreport, and I want to assign a value to the control source of a control on the subreport depending on the value given by the user in a separate form. Based on...
1
by: Hers2keep | last post by:
I have a report that I run which consists of two subreports. Occasionally, one or the other reports do not have valid recordsets due to a parameter query based on date. Right now, if there are...
2
by: Galina | last post by:
Hello All of a sudden I started getting error 13, type mismatch in a command, which was running happily for years. Here is a code: Option Compare Database Option Explicit Dim CmdClose1_Clicked...
1
by: Tim Jones | last post by:
Hey all, I am trying to try get a crytal report running properly. A "Hello World" report that does not add criteria to the record selection formula of the report (either in the development tool,...
2
by: Ron | last post by:
Hi All, I've got an aging report where the detail is a subreport on the transactions for a client. I've got a client name header/footer and the detail is between those areas. One of the...
17
by: =?Utf-8?B?SGVyYg==?= | last post by:
I have created a report and subreport in VB/ASP.NET. The report works fine but the subreport will not display. The subreport, when displayed as a standalone report, works fine. Any help I can...
0
by: pavankumarganesuni | last post by:
Hello Iam Facing a Problem While Creating Subreports In RDLC I Create A New Phyical DataSet For the Sub Report And I Bind It To the SubReport The Dataset Having Values Then the subreport is...
2
by: Dean Slindee | last post by:
With VS2005/Vista using the ReportViewer control, on my development PC I have a report with an embedded subreport. The report/subreport runs fine in VS test as well as ClickOnce deployed on the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.