Hello everyone, this is my first post here
I am making a bank database management system for my Olevel Computer Studies project. I am using VB6 as the front end and MS Access 2003 as the back-end database.
i am trying to code a command which will take the Ammount entered into a form and edit the customer balance according to it.
for eg. the bank user clicks on the withdrawals form. there are fields for account number, transaction number, amount withdrawn etc. the bank employee must enter the account number that needs to be accessed , the ammount to be withdrawn and all other feilds like cheque slip number etc.( i am attaching a screenshot of the form) the problem is the coding of the transaction save button.
i have written the following coding :i have included the error screen too ... please help ...Code:Private Sub cmdSave_Click() Dim AcCode As Object Set AcCode = txtAccountNo tblCstmrInfo.Refresh tblCstmrInfo.Recordset.Find ("accountno=" & "'" & AcCode & "'") 'for finding out string file. If tblCstmrInfo.Recordset.EOF Then MsgBox "No Match Found", vbExclamation, "Please enter a registered Code" tblCstmrInfo.Refresh End If Dim DAmmount As Object Dim InitBalance As Object Set DAmmount = (txtDeposit) Set InitBalance = (txtBalance) Dim FinalBalance As Object Set FinalBalance = InitBalance + DAmmount Set txtBalance = FinalBalance tblCstmrInfo.Recordset.Update tblWithdraw.Recordset.Update tblWithdraw.Recordset.Update MsgBox ("Record has been saved !") End If End Sub





Reply With Quote
