Is this possible??

1. Member
Join Date
Dec 1969
Posts
57

## Is this possible??

I am trying to take a field and add it up to get a total. I can do this, but the field is actually divided by a status of eitheir 1, 2, or 3 how can I get a total of 1, by itself and the same for 2 and 3 then the total of 1, 2, and 3. this is the field which, I need to do addition to this makes me even more confused:<BR><BR>&#060;% <BR>Dim budget,probability <BR>&#039;set variables <BR>budget=trim(RSbid("budget")) <BR>probability=trim(RSbid("probability")) <BR>answer=(budget*probability) <BR>%&#062;<BR><BR>&#060;%=formatNumber(answer,0)% &#062;<BR><BR>If anyone can help I do appreciate it.

2. Senior Member
Join Date
Dec 1969
Posts
569

## Explain again and this time S l o w l y

and with more detail...maybe an example<BR><BR>Brain Power.

3. Member
Join Date
Dec 1969
Posts
57

## RE: Explain again and this time S l o w l y

okay an example is I have a report that has three parts to it open, close and dead. They are all stored in the same database In the report itself I have made, I broke down the 3 parts into 3 sections. In each of the sections there is a field of numbers. I need to add the fields of one section for a subtotal, and then at the bottom of the report add all three subtotals to make a grand total. Here see if this helps<BR><BR>Open:<BR>id:1 project:whatever cost:\$50<BR>id:2 project:whatever cost:\$150<BR>subtotal:\$200 &#060;-- NEED THIS<BR><BR>Close:<BR>id:3 project:whatever cost:\$25<BR>id:4 project:whatever cost:\$50<BR>subtotal:\$75 &#060;--NEED THIS<BR><BR>Dead:<BR>id:5 project:whatever cost:\$10<BR>id:1 project:whatever cost:\$250<BR>subtotal:\$260 &#060;--NEED THIS<BR><BR>GRAND TOTAL OF OPEN,CLOSED AND DEAD:\$535<BR><BR>Thanks!

4. Senior Member
Join Date
Dec 1969
Posts
11,334

C&#039;mon man... this is an advanced forum.<BR><BR>field1 + field 2 = subtotal1;<BR><BR>subtotal1 + subtotal2 = grandtotal;

5. Member
Join Date
Dec 1969
Posts
57

thats what I tried and it didn&#039;t work I will try again, sorry

6. Senior Member
Join Date
Dec 1969
Posts
11,334

## Well

Is it doing something like this?<BR><BR>field 1 = 12<BR>field2 = 10<BR><BR>and your subtotal is 1210?<BR><BR>If so, make sure you&#039;re doing a CInt() or CDbl() on the values before you add them.

7. Member
Join Date
Dec 1969
Posts
57

## **** I FEEL DUMB

Sorry for wasting your time. I will smack myself now. Thanks

8. Senior Member
Join Date
Dec 1969
Posts
11,334