A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#Error



 
 
Thread Tools Display Modes
  #1  
Old November 8th, 2007, 12:47 AM posted to microsoft.public.access.reports
JohnLute
external usenet poster
 
Posts: 299
Default #Error

I have a text box with this
source:=[Reports]![rptFGPackConfigurations]![srptFGPKPrimarySecondaryResources]![SumWt]+[Reports]![rptFGPackConfigurations]![srptFGPKTertiaryResources]![SumWt]

How can I revise this so that the text box will properly display if one of
the [SumWt] fields is null? Currently, the text box displays #Error if one of
them is null.

Thanks for your help!

--
www.Marzetti.com
  #2  
Old November 8th, 2007, 04:39 AM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default #Error

Are the values actually Null or are there no records in the subreport?
Assuming the text box is located on rptFGPackConfigurations, you can shorten
your expression to:
=[srptFGPKPrimarySecondaryResources].Report.[SumWt] +
[srptFGPKTertiaryResources].Report.[SumWt]
If your subreports might not contain records, try:
=IIf([srptFGPKPrimarySecondaryResources].Report.HasData,
[srptFGPKPrimarySecondaryResources].Report.[SumWt],0) +
IIf([srptFGPKTertiaryResources].Report.HasData,
[srptFGPKTertiaryResources].Report.[SumWt],0)
--
Duane Hookom
Microsoft Access MVP


"JohnLute" wrote:

I have a text box with this
source:=[Reports]![rptFGPackConfigurations]![srptFGPKPrimarySecondaryResources]![SumWt]+[Reports]![rptFGPackConfigurations]![srptFGPKTertiaryResources]![SumWt]

How can I revise this so that the text box will properly display if one of
the [SumWt] fields is null? Currently, the text box displays #Error if one of
them is null.

Thanks for your help!

--
www.Marzetti.com

  #3  
Old November 8th, 2007, 11:54 AM posted to microsoft.public.access.reports
JohnLute
external usenet poster
 
Posts: 299
Default #Error

Hi, Duane!

There are no records in the subreport. The values in SumWt are from a
calculation.

I tried your suggestion but it returned a -1.0000 where I was expecting
892.42. Is the "0" conflicting with things?

--
www.Marzetti.com


"Duane Hookom" wrote:

Are the values actually Null or are there no records in the subreport?
Assuming the text box is located on rptFGPackConfigurations, you can shorten
your expression to:
=[srptFGPKPrimarySecondaryResources].Report.[SumWt] +
[srptFGPKTertiaryResources].Report.[SumWt]
If your subreports might not contain records, try:
=IIf([srptFGPKPrimarySecondaryResources].Report.HasData,
[srptFGPKPrimarySecondaryResources].Report.[SumWt],0) +
IIf([srptFGPKTertiaryResources].Report.HasData,
[srptFGPKTertiaryResources].Report.[SumWt],0)
--
Duane Hookom
Microsoft Access MVP


"JohnLute" wrote:

I have a text box with this
source:=[Reports]![rptFGPackConfigurations]![srptFGPKPrimarySecondaryResources]![SumWt]+[Reports]![rptFGPackConfigurations]![srptFGPKTertiaryResources]![SumWt]

How can I revise this so that the text box will properly display if one of
the [SumWt] fields is null? Currently, the text box displays #Error if one of
them is null.

Thanks for your help!

--
www.Marzetti.com

  #4  
Old November 8th, 2007, 12:31 PM posted to microsoft.public.access.reports
JohnLute
external usenet poster
 
Posts: 299
Default #Error

Whoops! Please disregard my other response. I found my typo.

Your suggestion works. Thanks a bunch!

--
www.Marzetti.com


"Duane Hookom" wrote:

Are the values actually Null or are there no records in the subreport?
Assuming the text box is located on rptFGPackConfigurations, you can shorten
your expression to:
=[srptFGPKPrimarySecondaryResources].Report.[SumWt] +
[srptFGPKTertiaryResources].Report.[SumWt]
If your subreports might not contain records, try:
=IIf([srptFGPKPrimarySecondaryResources].Report.HasData,
[srptFGPKPrimarySecondaryResources].Report.[SumWt],0) +
IIf([srptFGPKTertiaryResources].Report.HasData,
[srptFGPKTertiaryResources].Report.[SumWt],0)
--
Duane Hookom
Microsoft Access MVP


"JohnLute" wrote:

I have a text box with this
source:=[Reports]![rptFGPackConfigurations]![srptFGPKPrimarySecondaryResources]![SumWt]+[Reports]![rptFGPackConfigurations]![srptFGPKTertiaryResources]![SumWt]

How can I revise this so that the text box will properly display if one of
the [SumWt] fields is null? Currently, the text box displays #Error if one of
them is null.

Thanks for your help!

--
www.Marzetti.com

  #5  
Old November 8th, 2007, 03:04 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default #Error

Try to be more explicit with your questions in the future. I realize there is
a fine line between:
"How can I revise this so that the text box will
properly display if one of the [SumWt] fields
is null? Currently, the text box displays #Error
if one of them is null."
and
"There are no records in the subreport."

However, the solutions to the problem are different.

--
Duane Hookom
Microsoft Access MVP


"JohnLute" wrote:

Whoops! Please disregard my other response. I found my typo.

Your suggestion works. Thanks a bunch!

--
www.Marzetti.com


"Duane Hookom" wrote:

Are the values actually Null or are there no records in the subreport?
Assuming the text box is located on rptFGPackConfigurations, you can shorten
your expression to:
=[srptFGPKPrimarySecondaryResources].Report.[SumWt] +
[srptFGPKTertiaryResources].Report.[SumWt]
If your subreports might not contain records, try:
=IIf([srptFGPKPrimarySecondaryResources].Report.HasData,
[srptFGPKPrimarySecondaryResources].Report.[SumWt],0) +
IIf([srptFGPKTertiaryResources].Report.HasData,
[srptFGPKTertiaryResources].Report.[SumWt],0)
--
Duane Hookom
Microsoft Access MVP


"JohnLute" wrote:

I have a text box with this
source:=[Reports]![rptFGPackConfigurations]![srptFGPKPrimarySecondaryResources]![SumWt]+[Reports]![rptFGPackConfigurations]![srptFGPKTertiaryResources]![SumWt]

How can I revise this so that the text box will properly display if one of
the [SumWt] fields is null? Currently, the text box displays #Error if one of
them is null.

Thanks for your help!

--
www.Marzetti.com

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.