Does not output #error

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

Guest

I have created a text box that pulls data from a subform and outputs the
result.
My problem is when there is no value it ouputs an #error, instead of the
error I would like to $0.00

This is what I currently have in the control souce of the field:
=[rpt_revision subreport].Report.SumAmt
 
=IIF([rpt_revision subreport].Report.HasData, [rpt_revision
subreport].Report.SumAmt,0)
 
Thank you..That worked great.

Now I am having another problem.. I have the following text box that
outputs a total for each partner, how can I get the sum of all the total for
a grand total.

=[Partner_Initial_Amt]-[SumAllocation_Amt]+IIf([rpt_Allocation_Revision
subreport].Report.HasData,[rpt_Allocation_Revision
subreport].Report.SumOfAllocationAmt,0)

I have tried =Sum([txt_Total]) but it tells me it can't find [txt_Total] and
displays nothing. [txt_Total] is the name of expression above.
Also I have put the text box in the report footer..
Duane Hookom said:
=IIF([rpt_revision subreport].Report.HasData, [rpt_revision
subreport].Report.SumAmt,0)

--
Duane Hookom
MS Access MVP


Tina said:
I have created a text box that pulls data from a subform and outputs the
result.
My problem is when there is no value it ouputs an #error, instead of the
error I would like to $0.00

This is what I currently have in the control souce of the field:
=[rpt_revision subreport].Report.SumAmt
 
You can't total a control. You could try
=Sum([Partner_Initial_Amt]-[SumAllocation_Amt]+IIf([rpt_Allocation_Revisionsubreport].Report.HasData,[rpt_Allocation_Revisionsubreport].Report.SumOfAllocationAmt,0))

I would actually try to get the total from the subreport's record source
into the record source of the main report.
--
Duane Hookom
MS Access MVP


Tina said:
Thank you..That worked great.

Now I am having another problem.. I have the following text box that
outputs a total for each partner, how can I get the sum of all the total
for
a grand total.

=[Partner_Initial_Amt]-[SumAllocation_Amt]+IIf([rpt_Allocation_Revision
subreport].Report.HasData,[rpt_Allocation_Revision
subreport].Report.SumOfAllocationAmt,0)

I have tried =Sum([txt_Total]) but it tells me it can't find [txt_Total]
and
displays nothing. [txt_Total] is the name of expression above.
Also I have put the text box in the report footer..
Duane Hookom said:
=IIF([rpt_revision subreport].Report.HasData, [rpt_revision
subreport].Report.SumAmt,0)

--
Duane Hookom
MS Access MVP


Tina said:
I have created a text box that pulls data from a subform and outputs the
result.
My problem is when there is no value it ouputs an #error, instead of
the
error I would like to $0.00

This is what I currently have in the control souce of the field:
=[rpt_revision subreport].Report.SumAmt
 
Back
Top