You are on page 1of 13

Private Sub Command1_Click()

If Text1.Text = "bank" And Text2.Text = "bank" Then


MDIForm1.Show
Else
MsgBox "Wrong User"
End If
End Sub

Private Sub Command2_Click()


End
End Sub

Dim con As New ADODB.Connection


Dim rs As New ADODB.Recordset

Private Sub Command1_Click()


Set rs = Nothing
rs.Open "select * from CUSTOMERMASTER", con, adOpenDynamic, adLockOptimistic
rs.AddNew
rs("CUSTOMERNAME") = Text1.Text
rs("CUSTOMER AGE") = Text2.Text
rs("CUSTOMER D/O/B") = Text3.Text
rs("SEX") = Combo2.Text
rs("EDUCATION") = Text4.Text
rs("CUSTOMER ADDRESS") = Text5.Text
rs("CONTACT NUMBER") = Text6.Text
rs("OCCUPATION") = Text7.Text
rs("NATIONALITY") = Text8.Text
rs("RELIGION") = Text9.Text
rs.Update
MsgBox "record inserted"

End Sub

Private Sub Command2_Click()


Set rs = Nothing
rs.Open "select * from CUSTOMERMASTER where CUSTOMERNAME='" & Text1.Text
& "'", con, adOpenDynamic, adLockOptimistic
If Not rs.EOF Then
rs("CUSTOMERNAME") = Text1.Text
rs("CUSTOMER AGE") = Text2.Text
rs("CUSTOMER D/O/B") = Text3.Text
rs("SEX") = Combo2.Text
rs("EDUCATION") = Text4.Text
rs("CUSTOMER ADDRESS") = Text5.Text
rs("CONTACT NUMBER") = Text6.Text
rs("OCCUPATION") = Text7.Text
rs("NATIONALITY") = Text8.Text
rs("RELIGION") = Text9.Text
rs.Update
MsgBox "Record Updated"
Else
MsgBox "Record Not Found"
End If

End Sub

Private Sub Command3_Click()


Set rs = Nothing
rs.Open "select * from CUSTOMERMASTER where CUSTOMERNAME='" & Text1.Text
& "'", con, adOpenDynamic, adLockOptimistic
If Not rs.EOF Then
rs.Delete adAffectCurrent
MsgBox "record deleted"
Else
MsgBox "record not found"
End If

End Sub

Private Sub Command5_Click()


Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text1.SetFocus
End Sub

Private Sub Form_Load()


Set con = Nothing
con.Open "Provider=Microsoft.jet.OLEDB.4.0;Data Source=" & App.Path &
"\DATABASE\66666.mdb"

End Sub

Dim con As New ADODB.Connection


Dim rs As New ADODB.Recordset

Private Sub Command1_Click()


Set rs = Nothing
rs.Open "select * from ACCOUNTMASTER", con, adOpenDynamic, adLockOptimistic
rs.AddNew
rs("CUSTOMERNUMBER") = Text1.Text
rs("CUSTOMER NAME") = Text2.Text
rs("TYPE OF ACCOUNT") = Text3.Text
rs("MIN DEPOSIT AMOUNT") = Text4.Text
rs("INTEREST") = Text5.Text
rs("DURATION") = Text6.Text
'rs("Vehicleno") = combo1.Text
'rs("Timings") = Text7.Text
rs.Update
MsgBox "record inserted"

End Sub

Private Sub Command2_Click()


Set rs = Nothing
rs.Open "select * from ACCOUNTMASTER where CUSTOMERNUMBER='" & Text1.Text
& "'", con, adOpenDynamic, adLockOptimistic
If Not rs.EOF Then
rs("CUSTOMERNUMBER") = Text1.Text
rs("CUSTOMER NAME") = Text2.Text
rs("TYPE OF ACCOUNT") = Text3.Text
rs("MIN DEPOSIT AMOUNT") = Text4.Text
rs("INTEREST") = Text5.Text
rs("DURATION") = Text6.Text
rs.Update
MsgBox "Record Updated"
Else
MsgBox "Record Not Found"
End If

End Sub

Private Sub Command3_Click()


Set rs = Nothing
rs.Open "select * from ACCOUNTMASTER where CUSTOMERNUMBER='" & Text1.Text
& "'", con, adOpenDynamic, adLockOptimistic
If Not rs.EOF Then
rs.Delete adAffectCurrent
MsgBox "record deleted"
Else
MsgBox "record not found"
End If

End Sub
Private Sub Command5_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text1.SetFocus

End Sub

Private Sub Form_Load()


Set con = Nothing
con.Open "Provider=Microsoft.jet.OLEDB.4.0;Data Source=" & App.Path &
"\DATABASE\66666.mdb"
End Sub

Dim con As New ADODB.Connection


Dim rs As New ADODB.Recordset

Private Sub Command1_Click()


Set rs = Nothing
rs.Open "select * from DEPOSITS", con, adOpenDynamic, adLockOptimistic
rs.AddNew
rs("CUSTOMERNUMBER") = Text1.Text
rs("CUSTOMER NAME") = Text2.Text
rs("TYPE OF DEPOSIT") = Text3.Text
rs("DATE OF DEPOSIT") = Text4.Text
rs("DEPOSIT AMOUNT") = Text5.Text
rs("INTEREST") = Text6.Text
rs("DURATION") = Text7.Text
rs("BALANCE") = Text8.Text
rs.Update
MsgBox "record inserted"

End Sub

Private Sub Command2_Click()


Set rs = Nothing
rs.Open "select * from DEPOSITS where CUSTOMERNUMBER='" & Text1.Text & "'",
con, adOpenDynamic, adLockOptimistic
If Not rs.EOF Then
rs("CUSTOMERNUMBER") = Text1.Text
rs("CUSTOMER NAME") = Text2.Text
rs("TYPE OF DEPOSIT") = Text3.Text
rs("DATE OF DEPOSIT") = Text4.Text
rs("DEPOSIT AMOUNT") = Text5.Text
rs("INTEREST") = Text6.Text
rs("DURATION") = Text7.Text
rs("BALANCE") = Text8.Text
rs.Update
MsgBox "Record Updated"
Else
MsgBox "Record Not Found"
End If

End Sub

Private Sub Command3_Click()


Set rs = Nothing
rs.Open "select * from DEPOSITS where CUSTOMERNUMBER='" & Text1.Text & "'",
con, adOpenDynamic, adLockOptimistic
If Not rs.EOF Then
rs.Delete adAffectCurrent
MsgBox "record deleted"
Else
MsgBox "record not found"
End If

End Sub

Private Sub Command5_Click()


Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text1.SetFocus

End Sub

Private Sub Form_Load()


Set con = Nothing
con.Open "Provider=Microsoft.jet.OLEDB.4.0;Data Source=" & App.Path &
"\DATABASE\66666.mdb"

End Sub

Dim con As New ADODB.Connection


Dim rs As New ADODB.Recordset

Private Sub Command1_Click()


Set rs = Nothing
rs.Open "select * from LOANMASTER", con, adOpenDynamic, adLockOptimistic
rs.AddNew
rs("CUSTOMERNAME") = Text1.Text
rs("CUSTOMER AGE") = Text2.Text
rs("CUSTOMER D/O/B") = Text3.Text
rs("LOAN SANCTION DATE") = Text4.Text
rs("LOAN AMOUNT") = Text5.Text
rs("FATHER'S NAME") = Text6.Text
rs("ADDRESS") = Text7.Text
rs("CONTACT NUMBER") = Text8.Text
rs("OCCUPATION") = Text9.Text
rs("ANNUAL INCOME") = Text10.Text
rs("SECURITY") = Text11.Text
rs("QUALIFICATION") = Text12.Text
rs("REPAYMENT DURATION") = Text13.Text
rs("PAYMENT") = Text14.Text
rs.Update
MsgBox "record inserted"
Set con = Nothing
con.Open "Provider=Microsoft.jet.OLEDB.4.0;Data Source=" & App.Path &
"\DATABASE\66666.mdb"

End Sub

Private Sub Command2_Click()


Set rs = Nothing
rs.Open "select * from LOANMASTER where CUSTOMERNAME='" & Text1.Text & "'",
con, adOpenDynamic, adLockOptimistic
If Not rs.EOF Then
rs("CUSTOMERNAME") = Text1.Text
rs("CUSTOMER AGE") = Text2.Text
rs("CUSTOMER D/O/B") = Text3.Text
rs("LOAN SANCTION DATE") = Text4.Text
rs("LOAN AMOUNT") = Text5.Text
rs("FATHER'S NAME") = Text6.Text
rs("ADDRESS") = Text7.Text
rs("CONTACT NUMBER") = Text8.Text
rs("OCCUPATION") = Text9.Text
rs("ANNUAL INCOME") = Text10.Text
rs("SECURITY") = Text11.Text
rs("QUALIFICATION") = Text12.Text
rs("REPAYMENT DURATION") = Text13.Text
rs("PAYMENT") = Text14.Text
rs.Update
MsgBox "Record Updated"
Else
MsgBox "Record Not Found"
End If
End Sub

Private Sub Command3_Click()


Set rs = Nothing
rs.Open "select * from LOANMASTER where CUSTOMERNAME='" & Text1.Text & "'",
con, adOpenDynamic, adLockOptimistic
If Not rs.EOF Then
rs.Delete adAffectCurrent
MsgBox "record deleted"
Else
MsgBox "record not found"
End If

End Sub

Private Sub Command5_Click()


Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text1.SetFocus

End Sub

Private Sub Form_Load()


Set con = Nothing
Set con = Nothing
con.Open "Provider=Microsoft.jet.OLEDB.4.0;Data Source=" & App.Path &
"\DATABASE\66666.mdb"

End Sub

You might also like