Hi, i got a program im working on. it does some calculations using quantity and price in such. heres the calculation module.
Private Sub calculations()
If AdultsizeRadioButton1.Checked = True Then
adulttotaldecimal = quantityinteger * adultpricedecimal * hoursinteger
ElseIf ChildsizeRadioButton2.Checked = True Then
childtotaldecimal = quantityinteger * childpricedecimal * hoursinteger
End If
adultchildtotaldecimal = adulttotaldecimal + childtotaldecimal
extendedpricedecimal = adultchildtotaldecimal * servicetaxdecimal
accumwagonsrentedinteger += quantityinteger
accumprofitdecimal += extendedpricedecimal
End Sub
Ok, everything has worked when i display the information.... up until the accumprofitdecimal variable. When i display that value its NOT what it should be. For instance i'm putting in a quanity of 1 and an hour of 1 for an adult then for a child, the extended price comes out properly as $2.15 now the code accumprofitdecimal += extendedpricedecimal SHOULD add the extended price (2.15) to the accumulative total. but when i display the accum profit total it shows a number that makes zero sense... is accumprofitdecimal += extendedpricedecimal not correct code?