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

Calculation error ...sometimes

Status
Not open for further replies.

cbsm

Programmer
Oct 3, 2002
229
FR
hello !

this is my very odd problem.

I have a Form (Order Header)
in this form a Subform (Order lines).

In the footer of the Subform - I calculate the number of item and the total amount.
(Sum(Items) and sum(item*price) )
Everything is fine when I create my Order.

The user can also look for old orders.
In this case instead of the result I have #Error in both fields.
If I go through in Debug mode - the result is OK.
I added .repaint, .recalc , .refresh - no effect.
I even tried to put delay to give the "time" for the calculation - no result ...
I checked if any Nulls or stuff like that but no luck.

Any Idea where I could look ?

Many thanks
 
Have you tried:

"(Sum(Items) and sum(item*price) )"

=Nz(Sum([Items])) and =Nz(Sum([Items]*[Price]))

 
How are ya cbsm . . .

or perhaps this:
Code:
[blue]   =Sum(Nz([Items]))
and
   =Sum(Nz([Items]) * Nz([Price]))[/blue]



Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top