Help with report query.

  • Thread starter Thread starter Karen
  • Start date Start date
K

Karen

I need help with a query required for a report I'm doing.
It's a financial report and the fields may be populated
with a positive or negative number. How do I make the
query add the numbers until it meets a negative, subtract
that number then continuing adding the number?

Thanks! (this whole project is driving me crazy, so I'm
sorry if this doesn't make sense!)

Karen
 
I need help with a query required for a report I'm doing.
It's a financial report and the fields may be populated
with a positive or negative number. How do I make the
query add the numbers until it meets a negative, subtract
that number then continuing adding the number?

Thanks! (this whole project is driving me crazy, so I'm
sorry if this doesn't make sense!)

Karen

I don't understand your question.
You're losing me when you state
add the numbers until it meets a negative, subtract
that number then continuing adding the number?

What result would you expect if the data was:
+5
+3
-2
+4
The sum should = 10
Is that your expected result?

Or .....
+5
+3
- -2
+4

Is your expected result 14?

Either way, you probably would be better off doing this directly in
your report, using the appropriate expression in an unbound control's
control source, i.e.
= Sum([FieldName]) ' the result will be 10
= Sum(ABS([FieldName])) ' the result will be 14
 
That's exactly what I'm talking about Fred! See this
project is so mind-numbing I can't even put together
coherent thoughts! Thanks so much for your help!
-----Original Message-----
I need help with a query required for a report I'm doing.
It's a financial report and the fields may be populated
with a positive or negative number. How do I make the
query add the numbers until it meets a negative, subtract
that number then continuing adding the number?

Thanks! (this whole project is driving me crazy, so I'm
sorry if this doesn't make sense!)

Karen

I don't understand your question.
You're losing me when you state
add the numbers until it meets a negative, subtract
that number then continuing adding the number?

What result would you expect if the data was:
+5
+3
-2
+4
The sum should = 10
Is that your expected result?

Or .....
+5
+3
- -2
+4

Is your expected result 14?

Either way, you probably would be better off doing this directly in
your report, using the appropriate expression in an unbound control's
control source, i.e.
= Sum([FieldName]) ' the result will be 10
= Sum(ABS([FieldName])) ' the result will be 14
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Back
Top