└── vb /vb: -------------------------------------------------------------------------------- 1 | Private Sub Add_Click() Adodc1.Recordset.AddNew Textl.SetFocus End Sub 2 | DELETE: 3 | Private Sub Delete_Click() 4 | If MsgBox ("DELETE IT?",vbOKCancel)= vbOK Then 5 | Adodc1.Recordset.Delete End If MsgBox "ONE ROW DELETED" Textl.Text- " " 6 | Text2.Text - " " 7 | Text3.Text - " " 8 | Text4.Text - " " 9 | Text5.Text - " " 10 | Text6.Text - " " 11 | Text7.Text - " " 12 | Text8.Text - " " 13 | Text9.Text - " " Textl0.Text - " " End Sub SAVE: 14 | Private Sub Save_Click() 15 | If MsgBox ("SAVE IT?",vbOKCancel ) = vbOK Then Adodc1.Recordset.Update Else 16 | Adodc1.Recordset.CancelUpdate 17 | End If End Sub FIND: 18 | Private Sub Find_Click() Dim N as string 19 | N = InputBox ("Enter the accno") Adodc1.Recordset.Find "accno=" & N 20 | If Adodcl.Recordset.BOF or Adodc1.Recordset.EOF Then MsgBox "Record not found" 21 | End If End Sub 22 | Department of Computer Science and Engineering 23 | Page:______ 24 | K. Ramakrishnan College of Engineering (Autonomous), Trichy 25 | UPDATE: 26 | Private Sub Update_Click() Adodc1.Recordset.EditMode Adodc1.Recordset.Update End 27 | Sub FIRST: 28 | Private Sub First_Click() Adodc1.Recordset.MoveFirst End Sub LAST: 29 | Private Sub Last_Click() Adodc1.Recordset.MoveLast End Sub NEXT: 30 | Private Sub Next_Click() Adodc1.Recordset.MoveNext End Sub PREVIOUS: 31 | Private Sub Previous_Click() Adodc1.Recordset.MovePrevious End Sub DEPOSIT: 32 | Private Sub Deposit_Click0 Dim N1 as string 33 | N = InputBox ("Enter the accno") Adodcl.Recordset.Find "accno=" & N Nl = InputBox 34 | ("Enter the amount") Text4.Text= val (Text4.Text) + Nl Adodc1.Recordset.Update 35 | End Sub 36 | WITHDRAW: 37 | Private Sub Withdraw_Click() Dim Nl as string 38 | N = InputBox ("Enter the accno") Adodcl.Recordset.Find "accno=" & N Nl = InputBox 39 | ("Enter the amount") Text4.Text= val (Text4.Text) - NlAdodcl.Recordset.Update 40 | End Sub EXIT: 41 | Private Sub Add_Click() Unload Me End Sub FUNCTION: 42 | Function Calculate() 43 | Text8.Text=val(Text4.Text) + val (Text5.Text) + val (Text6.Text) + val (Text7.Text) 44 | Text9.Text=val(Text5.Text) + val (Text6.Text) + val (Text7.Text) 45 | Text 46 | 10.Text=val(Text8.Text) 47 | + 48 | val 49 | (Text9.Text) 50 | BASICPAY,HRA,DA,MA,GROSSPAY,DEDUCTION,NETPAY: 51 | Private Sub Basicpay_Change() Call Calculate End Sub 52 | Private Sub HRA_Change() Call Calculate End Sub 53 | Private Sub DA_Change() Call Calculate End Sub 54 | Private Sub MA_Change() Call Calculate 55 | End Sub 56 | Private Sub Grosspay_Change() Call Calculate End Sub 57 | End 58 | Function 59 | Department of Computer Science and Engineering 60 | Page:______ 61 | K. Ramakrishnan College of Engineering (Autonomous), Trichy 62 | Private Sub Deduction_Change() Call Calculate End Sub 63 | Private Sub Netpay_Change() Call Calculate End Sub 64 | --------------------------------------------------------------------------------