Sub class has four fields dates, transaction, memo and amount.
I have a deposit form, and withdraw form. Each time one transaction is entered it creates an object with sub class fields, then adds to the account collection. My problem is not understanding how to call the deposit/withdraw method and pass the current transaction amount back to the base class to calculate the new balance. Does anyone have any links to information/tutorials on how to perform something like this? As you can see with my code I have tried various different approaches without any success.
'Base Class Deposit procedure accepts the current deposit amount adding to the balance. Public Sub AddDeposit(ByVal deposit As Double) dblAccountBalance += deposit End Sub 'Deposit form to enter new transaction infomation. Dim dates As String Dim transaction As String Dim memo As String Dim deposit As Double Dim newBalance As Double dates = txtDateDeposit.Text transaction = lblTransaction.Text memo = txtMemo.Text deposit = CDbl(txtAmountDeposit.Text) newBalance = AddDeposit(deposit) 'Add new object to the collection. g_accountCollection.Add(New CheckingAcct(dates, transaction, memo, deposit, newBalance))