#Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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)
 
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 said:
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 said:
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!
 
Whoops! Please disregard my other response. I found my typo.

Your suggestion works. Thanks a bunch!

--
www.Marzetti.com


Duane Hookom said:
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 said:
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!
 
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 said:
Whoops! Please disregard my other response. I found my typo.

Your suggestion works. Thanks a bunch!

--
www.Marzetti.com


Duane Hookom said:
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 said:
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!
 
Back
Top