Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#Error# in Calculated field

Status
Not open for further replies.

vani65

Programmer
May 19, 2003
101
0
0
AU
Hi,
I have a main report with several subreports.I have totals from two subreports adding up in main report. In the calculated field in control source I am using following code:

=[Reports]![rptJobCostAnalysis]![rptJobRep: Expenses].[Form]![ExpenseTotals]+IIf([JobSheet].[Report].[HasData],[JobSheet].[Report]![Text19],0).

All was working fine.all of sudden in this field #Error# is being displayed.I am confused can anyone highlight what should I do.
Thanks in advance
 
vani65
The check for HasData normally needs to evaluate to either True (=-1) or False (=0). An example...
=IIf([JobSheet].[Report].[HasData]=-1,[JobSheet].[Report]![Text19],0)

Could that be the problem?

Tom
 
Hi THWatson,
I tried using following but still getting #Error# in the field.
=[Reports]![rptJobCostAnalysis]![rptJobRep: Expenses].[Form]![ExpenseTotals]+IIf([JobSheet].[Report].[HasData]=-1,[JobSheet].[Report]![Text19],0)

Could you please point me where I am doing wrong.
Thanks
 
Have you checked the exact spelling of everything, in case a letter has gone astray?
You have Form rather than Report here:
=[Reports]![rptJobCostAnalysis]![rptJobRep: Expenses].[red][Form][/red]![ExpenseTotals]+IIf([JobSheet].[Report].[HasData]=-1,[JobSheet].[Report]![Text19],0)
 
Hi Remou,
I was away just back to work. That was wonderful I have been missing all the time. Thanks for your pointing the error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top