You are on page 1of 8

Oracle Table Structure :

empdet :

Name Null? Type


----------------------------------------- -------- ----------------------------
NAME VARCHAR2(20)
ID NUMBER(4)
AGE NUMBER(3)
GENDER VARCHAR2(10)
DESIGNATION VARCHAR2(25)
SALARY NUMBER(8)

empsal :

Name Null? Type


----------------------------------------- -------- ----------------------------
DESIGNATION VARCHAR2(25)
BASICPAY NUMBER(7)
DA NUMBER(5)
HRA NUMBER(5)
GROSSPAY NUMBER(9)

empded :

Name Null? Type


----------------------------------------- -------- ----------------------------
NAME VARCHAR2(20)
ID NUMBER(4)
BASIC NUMBER(6)
GROSSPAY NUMBER(9)
PF NUMBER(5)
INCOMETAX NUMBER(3,2)
NETPAY NUMBER(10)
Form Design :

Main :

Employee Details :
Salary Details :

Deduction :
Coding :

Main :

Private Sub Command2_Click()


Form2.Show
End Sub

Private Sub Command3_Click()


Form3.Show
End Sub

Private Sub Command4_Click()


Form4.Show
End Sub

Private Sub Command5_Click()


End
End Sub

Employee details :

Private Sub Command1_Click()


If (Adodc1.Recordset.BOF = False) Then Adodc1.Recordset.MoveLast
Adodc1.Recordset.AddNew
End Sub

Private Sub Command2_Click()


Adodc1.Recordset.Delete
MsgBox ("deleted")
End Sub

Private Sub Command3_Click()


Me.Hide
Form1.Show
End Sub

Private Sub Command5_Click()


Dim ctrl As Control
For Each ctrl In Me
If TypeOf ctrl Is TextBox Then
ctrl.Text = ""
ElseIf TypeOf ctrl Is ComboBox Then
ctrl.Text = ""
End If
Next ctrl
End Sub
Salary Details :

Private Sub Command1_Click()


Adodc1.Recordset.AddNew
End Sub

Private Sub Command2_Click()


Adodc1.Recordset.Delete
MsgBox ("deleted")
End Sub

Private Sub Command3_Click()


Me.Hide
Form1.Show
End Sub

Private Sub Command4_Click()


Dim a, b, c
a = Val(Text2.Text)
b = Val(Text3.Text)
c = Val(Text4.Text)
d=a+b+c
Text5.Text = d
End Sub

Private Sub Command5_Click()


Dim ctrl As Control
For Each ctrl In Me
If TypeOf ctrl Is TextBox Then
ctrl.Text = ""
ElseIf TypeOf ctrl Is ComboBox Then
ctrl.Text = ""
End If
Next ctrl
End Sub

Deduction :

Private Sub Command1_Click()


Adodc1.Recordset.AddNew
End Sub

Private Sub Command2_Click()


Adodc1.Recordset.Delete
MsgBox ("deleted")
End Sub

Private Sub Command3_Click()


Me.Hide
Form1.Show
End Sub

Private Sub Command4_Click()


Dim a, b, c, d, e
a = Val(Text3.Text)
b = Val(Text4.Text)
c = 0.05 * a
Text5.Text = c
d = 0.025 * a
Text6.Text = d
e=b-c-d
Text7.Text = e
End Sub

Private Sub Command5_Click()


Dim ctrl As Control
For Each ctrl In Me
If TypeOf ctrl Is TextBox Then
ctrl.Text = ""
ElseIf TypeOf ctrl Is ComboBox Then
ctrl.Text = ""
End If
Next ctrl
End Sub

Output :

Main :
Employee details :

Salary Details :
Deduction :

You might also like