Image

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnama.SetFocus

End Sub

 

Private Sub cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub cmdproses_Click()

Dim A As String

txttm.Text = “20” & Left(txtnpm.Text, 2)

txtnu.Text = Right(txtnpm.Text, 3)

A = Mid(txtnpm.Text, 3, 1)

If A = “1” Then

txtjur.Text = “Sistem Informasi”

ElseIf A = “2” Then

txtjur.Text = “Manajemen Informatika”

ElseIf A = “3” Then

txtjur.Text = “Tehnik Komputer”

End If

A = Mid(txtnpm.Text, 4, 2)

If A = “00” Then

txtprodi.Text = “Strata1”

ElseIf A = “01” Then

txtprodi.Text = “Diploma4”

ElseIf A = “02” Then

txtprodi.Text = “Diploma3”

End If

End Sub

 

Private Sub Cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Cmddelete_Click()

Data1.Recordset.Delete

End Sub

 

Advertisements

Image

Private Sub Chkbold_Click()
If Chkbold.Value = 1 Then
Lblteks.FontBold = True
Else
Lblteks.FontBold = False
End If
End Sub

Private Sub Chkitalic_Click()
If Chkitalic.Value = 1 Then
Lblteks.FontItalic = True
Else
Lblteks.FontItalic = False
End If
End Sub

Private Sub Chkstrike_Click()
If Chkstrike.Value = 1 Then
Lblteks.FontStrikethru = True
Else
Lblteks.FontStrikethru = False
End If
End Sub

Private Sub chkunder_Click()
If chkunder.Value = 1 Then
Lblteks.FontUnderline = True
Else
Lblteks.FontUnderline = False
End If
End Sub

Private Sub Cmdexit_Click()
Unload Me
End Sub

Private Sub OptBlue_Click()
Lblteks.ForeColor = vbBlue

End Sub

Private Sub OptGreen_Click()
Lblteks.ForeColor = vbGreen

End Sub

Private Sub OptRed_Click()
Lblteks.ForeColor = vbRed

End Sub

Private Sub OptYellow_Click()
Lblteks.ForeColor = vbYellow

End Sub

Image

Private Sub Check1_Click()
Label2.FontBold = Check1.Value
End Sub

Private Sub Check2_Click()
Label2.FontItalic = Check2.Value
End Sub

Private Sub Command1_Click()
Label2.Caption = Text1.Text
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Option1_Click()
Label2.ForeColor = vbBlue
End Sub

Private Sub Option2_Click()
Label2.ForeColor = vbRed
End Sub

ImagePrivate Sub Command1_Click()
Text3.Text = Val(Text1.Text) – Val(Text2.Text)
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.Text = Val(Text1.Text) * 0.1
End If
End Sub
ImagePrivate Sub Command1_Click()
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End Sub

Private Sub Command2_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub

Private Sub Command3_Click()
Text3.Text = Val(Text1.Text) – Val(Text2.Text)
End Sub

Private Sub Command4_Click()
Text3.Text = Val(Text1.Text) / Val(Text2.Text)
End Sub

Private Sub Command5_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
End Sub

Private Sub Command6_Click()
Unload Me
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
ImagePrivate Sub Text1_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Text2_keypress(keyascii As Integer)
If keyascii = 13 Then
Text3.SetFocus
End If
End Sub

Private Sub Text3_keypress(keyascii As Integer)
If keyascii = 13 Then
Text4.SetFocus
End If
End Sub

Private Sub Text4_keypress(keyascii As Integer)
If keyascii = 13 Then
Text5.SetFocus
End If
End Sub

Private Sub Text5_KeyPress(keyascii As Integer)
If keyascii = 13 Then
Text6.SetFocus
End If
End SubPrivate Sub Command1_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End If
End Sub

Image