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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error on sum formula

Status
Not open for further replies.

Hueby

MIS
Oct 20, 2004
321
US
Why would I get a error "A field is required here" under my (CDbl({spLaborAct;1.Hourswrk}) part in the following code?

Code:
sum(CDbl({spLaborAct;1.Hourswrk}), {spLaborAct;1.purchord})

Do I not have my code setup right here?
 
Try this in two steps:

//{@HrsWk}:
cdbl({spLaborAct;1.Hourswrk})

//{@tothrs}:
sum({@HrsWk},{spLaborAct;1.purchord})

-LB
 
Now I have a "the remaining text does appear to be part of the formula..." highlighted on the 'sum({@HrsWk},{spLaborAct;1.purchord})' code.

Can I ask what is with the //{@HrsWk}: and //{@tothrs}: comments? I'm not fully understanding this. Thanks lbass!
 
LB is suggesting 2 different formulas, not one with 2 formulas within and comments.

Create the first, and base the second on the first.

-k

 
The commented lines were just names I gave to the two different formulas, so that you could see I was using the first formula in the second formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top