problems with a code

Joined
Jan 24, 2005
Messages
10
Programming Experience
Beginner
im working on a checking account project where i have 3 radio buttons for the type of transaction, deposit check n service charge n 3 separate text boxes where u input the amount n a label that displays the new balance n i wanna make new balance a running total so like whatever i put in deposit it keeps adding up to the balance... welll i keep tryin n everytime i get when i put in a number for deposit... in the new balance it shows $0.00 all the time could someone please help me out heres the code

'Dimension the module level variables
Dim mdecFinalAmount As Decimal

Private Sub btnCalculate_Click...
'Dimension the procedure variables
Dim decDepositPrice As Decimal
Dim decCheckPrice As Decimal
Dim decServiceChargePrice As Decimal

'Calculate and display the deposit amount
If radDeposit.Checked = True Then
mdecFinalAmount += decDepositPrice
lblFinalAmount = FormatCurrency(mdecFinalAmount)
End If

Ive also tried just get rid of the format currency line but it still shows $0.00
 

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
I can't see any glaring mistakes in the code.
Try using breakpoints and step through your code using watches to check the value of the different variables.
 
Top Bottom