Code isn't subtracting.....it Should PLEASE HELP!!!

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

Guest

there are two sub reports they are part of the detail section of an energy
bill. it adds the positives, but doesn't subract the negatives...here is the
line

=[R-Detail Table subreport].Report![R-Detail3]+[N-Detail Table
subreport].Report![N-Detail3]

thanks for your help
 
John

According to the expression, you are adding two values together. If one of
the values is a negative value, adding a negative = subtracting.

Can you provide an example in data?
 
yes, i am trying to get a total for the data. I want the negative to
subtract, but its only adding, not subtracting...here are some numbers:

761.22
22.85
-39.03
-733.89
-22.02
-76.15

total says 784.37 its adding positive...but not subtracting negative


Jeff Boyce said:
John

According to the expression, you are adding two values together. If one of
the values is a negative value, adding a negative = subtracting.

Can you provide an example in data?

--
Regards

Jeff Boyce
<Office/Access MVP>

John C Brainard said:
there are two sub reports they are part of the detail section of an energy
bill. it adds the positives, but doesn't subract the negatives...here is the
line

=[R-Detail Table subreport].Report![R-Detail3]+[N-Detail Table
subreport].Report![N-Detail3]

thanks for your help
 
John

Have you tried adding the values in a query instead?

--
Regards

Jeff Boyce
<Office/Access MVP>

John C Brainard said:
yes, i am trying to get a total for the data. I want the negative to
subtract, but its only adding, not subtracting...here are some numbers:

761.22
22.85
-39.03
-733.89
-22.02
-76.15

total says 784.37 its adding positive...but not subtracting negative


Jeff Boyce said:
John

According to the expression, you are adding two values together. If one of
the values is a negative value, adding a negative = subtracting.

Can you provide an example in data?

--
Regards

Jeff Boyce
<Office/Access MVP>

there are two sub reports they are part of the detail section of an energy
bill. it adds the positives, but doesn't subract the negatives...here
is
the
line

=[R-Detail Table subreport].Report![R-Detail3]+[N-Detail Table
subreport].Report![N-Detail3]

thanks for your help
 
no, but the breakdown of the data is all teh customer information that is
finite....ie addresss, name...is all in one table. then linked to 3 other
tables by the accountnumber. so, there are multiple account entries in each
table, and i couldn't figure out how to add just hat persons amount and store
it in the customer information table for later..cause itwould need to had
numbers from all 3 of the other tables to get the total. i almost works
John

Have you tried adding the values in a query instead?

--
Regards

Jeff Boyce
<Office/Access MVP>

John C Brainard said:
yes, i am trying to get a total for the data. I want the negative to
subtract, but its only adding, not subtracting...here are some numbers:

761.22
22.85
-39.03
-733.89
-22.02
-76.15

total says 784.37 its adding positive...but not subtracting negative


Jeff Boyce said:
John

According to the expression, you are adding two values together. If one of
the values is a negative value, adding a negative = subtracting.

Can you provide an example in data?

--
Regards

Jeff Boyce
<Office/Access MVP>

there are two sub reports they are part of the detail section of an
energy
bill. it adds the positives, but doesn't subract the negatives...here is
the
line

=[R-Detail Table subreport].Report![R-Detail3]+[N-Detail Table
subreport].Report![N-Detail3]

thanks for your help
 
John

Please post the SQL statement of the query you are using.

From your original post, you indicated adding two controls -- are you trying
that in a control on the report?

In which of the controls do the negative values appear?

Can you "add" all values and get the correct number within the subreports?

--
Regards

Jeff Boyce
<Office/Access MVP>

John C Brainard said:
no, but the breakdown of the data is all teh customer information that is
finite....ie addresss, name...is all in one table. then linked to 3 other
tables by the accountnumber. so, there are multiple account entries in each
table, and i couldn't figure out how to add just hat persons amount and store
it in the customer information table for later..cause itwould need to had
numbers from all 3 of the other tables to get the total. i almost works
John

Have you tried adding the values in a query instead?

--
Regards

Jeff Boyce
<Office/Access MVP>

yes, i am trying to get a total for the data. I want the negative to
subtract, but its only adding, not subtracting...here are some numbers:

761.22
22.85
-39.03
-733.89
-22.02
-76.15

total says 784.37 its adding positive...but not subtracting negative


:

John

According to the expression, you are adding two values together. If
one
of
the values is a negative value, adding a negative = subtracting.

Can you provide an example in data?

--
Regards

Jeff Boyce
<Office/Access MVP>

there are two sub reports they are part of the detail section of an
energy
bill. it adds the positives, but doesn't subract the
negatives...here
is
the
line

=[R-Detail Table subreport].Report![R-Detail3]+[N-Detail Table
subreport].Report![N-Detail3]

thanks for your help
 
Back
Top