Image

Private Sub cmdbaru_Click()

Data1.Recordset.AddNew

txtnama.SetFocus

End Sub

 

Private Sub cmddelete_Click()

Data1.Recordset.Delete

End Sub

 

Private Sub cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub cmdproses_Click()

Dim s As String

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

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

If s = “1” Then

txtjurusan.Text = “SistemInformasi”

ElseIf s = “2” Then

txtjurusan.Text = “tekhnikInformasi”

ElseIf s = “3” Then

txtjurusan.Text = “ManajemenInformatika”

ElseIf s = “4” Then

txtjurusan.Text = “komputerakutansi”

End If

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

If s = “01” Then

txtps.Text = “Strata Satu”

ElseIf s = “02” Then

txtps.Text = “Diploma empat”

ElseIf s = “03” Then

txtps.Text = “Diploma Tiga”

ElseIf s = “04” Then

txtps.Text = “Diploma Dua”

End If

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

End Sub

 

Private Sub cmdsimpan_Click()

Data1.Recordset.Update

End Sub

 

Advertisements

Image

Private Sub Combo1_Click()
Dim nama, jurusan, HM As String
Select Case Combo1.Text
Case “12100152”
nama = “haries purbianto”
jurusan = “Sistem Informasi”
Case “12100153”
nama = “hendra perasetia”
jurusan = “Diploma Empat”
Case “12100154”
nama = “fahrul”
jurusan = “Diploma Tiga”
Case “12100155”
nama = “lia”
jurusan = “Diploma Dua”
Case “12100156”
nama = “juli irawan”
jurusan = “Diploma Satu”
End Select
Text1.Text = nama
Text2.Text = jurusan
Text3.SetFocus
End Sub

Private Sub command1_Click()
Dim NA As Integer
Dim HM As String
QUIS = Val(Text3.Text)
TUGAS = Val(Text4.Text)
UTS = Val(Text5.Text)
UAS = Val(Text6.Text)
NA = (QUIS + TUGAS + UTS + UAS) / 4
Text7.Text = NA

Select Case Text7.Text
Case Is > 80
HM = “A”
Case Is > 70
HM = “B”
Case Is > 60
HM = “C”
Case Is > 50
HM = “D”
Case Is < 50
HM = “E”
End Select
Text8.Text = HM
End Sub

Private Sub Command2_Click()
Combo1.SetFocus
Combo1.Text = “”
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Text7.Text = “”
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Form_Load()
Combo1.AddItem “12100152”
Combo1.AddItem “12100153”
Combo1.AddItem “12100154”
Combo1.AddItem “12100155”
Combo1.AddItem “12100156”
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 Sub

MENENTUKAN WARNA PADA TULISAN

Image

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

Private Sub ChkBold_Click()
Label2.FontBold = ChkBold.Value
End Sub

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

Private Sub Command2_Click()
End
End Sub

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

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

HARGA SETELAH DIDISKON10%

Image

Private 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

kalkulator mini

Image

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

nilai mahasiswa

Gambar

Private Sub Command1_Click()
Text7.Text = Val((Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text)) / 4
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
Text4 = “”
Text5 = “”
Text6 = “”
Text7 = “”
End Sub

Private Sub Command3_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
Text4 = “”
Text5 = “”
Text6 = “”
Text7 = “”
End Sub

Private Sub Command4_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.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 Sub

Private Sub Text6_KeyPress(KeyAscii As Integer)
Text7.Text = Val((Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text)) / 4
End Sub

perkalian dua bilangan

Gambar

Private Sub Command1_Click()
Text3.Text = Val(Text1.Text) * (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 keyasceii = 13 Then
Text2.SetFocus
End If
End Sub

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