TUGAS.4

Image

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub Cmdproses_Click()
Dim n, jurusan, pstudi, bp As String
Texttahun.Text = “20” & Left(Textnpm.Text, 2)
n = Mid(Textnpm.Text, 3, 1)
If n = “1” Then
jurusan = “sistem informasi”
ElseIf n = “2” Then
jurusan = “tehnik informatika”
ElseIf n = “3” Then
jurusan = “manajemen informasi”
ElseIf n = “4” Then
jurusan = “manajemen & komputer akuntansi”
End If
n = Mid(Textnpm.Text, 4, 2)
If n = “01” Then
pstudi = “strata satu”
ElseIf n = “02” Then
pstudi = “diploma empat”
ElseIf n = “03” Then
pstudi = “diploma tiga”
ElseIf n = “04” Then
pstudi = “diploma dua”
End If
textjurusan.Text = jurusan
textpstudi.Text = pstudi
Textnurut.Text = Right(Textnpm.Text, 3)
End Sub

Private Sub Command1_Click()
Data1.Recordset.AddNew
Text1.SetFocus
End Sub

Private Sub Command2_Click()
Data1.Recordset.Update
End Sub

Private Sub Command3_Click()
Data1.Recordset.Delete
End Sub

Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnpm.SetFocus
End If
End Sub

Tugas Vb Data Buku 3

RISKA A 3

Private Sub CmdBATAL_Click()

txtkode.SetFocus

txtkode.Text = “”

txtjudul.Text = “”

txtpengarang.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

Private Sub CmdKELUAR_Click()

Unload Me

End Sub

Private Sub CmdLAGI_Click()

txtkode.SetFocus

txtkode.Text = “”

txtjudul.Text = “”

txtpengarang.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

Private Sub CmdPROSES_Click()

Dim A As String

txttahun.Text = “20” & Right(txtkode.Text, 2)

A = Mid(txtkode.Text, 3, 3)

If A = “SIM” Then

txtjudul.Text = “SISTEM INFORMASI MANAJEMEN”

ElseIf A = “EDP” Then

txtjudul.Text = “ELEKTRONIK DATA PROCESSING”

ElseIf A = “MNJ” Then

txtjudul.Text = “MANAJEMEN”

ElseIf A = “CDR” Then

txtjudul.Text = “CORELDRAW”

ElseIf A = “RPL” Then

txtjudul.Text = “REKAYASA PERANGKAT LUNAK”

End If

A = Left(txtkode.Text, 1)

If A = “A” Then

txtpenerbit.Text = “ANDI OFSSET YOGYAKARTA”

ElseIf A = “I” Then

txtpenerbit.Text = “INDAH SURABAYA”

ElseIf A = “S” Then

txtpenerbit.Text = “SALEMBA”

ElseIf A = “E” Then

txtpenerbit.Text = “ELEK MEDIA KOMPUTINDO”

ElseIf A = “M” Then

txtpenerbit.Text = “MAXICOM”

End If

A = Mid(txtkode.Text, 3, 3)

If A = “SIM” Then

txtpengarang.Text = ” YATI NUR OKTAFIA”

ElseIf A = “EDP” Then

txtpengarang.Text = “IMAM TARMIZI”

ElseIf A = “MNJ” Then

txtpengarang.Text = “VALENTINA MARIANA”

ElseIf A = “CDR” Then

txtpengarang.Text = “RYAN SUHANDI”

ElseIf A = “RPL” Then

txtpengarang.Text = “SHINTA UMPU SINGA”

End If

A = Mid(txtkode.Text, 3, 3)

If A = “SIM” Then

txtharga.Text = “83000”

ElseIf A = “EDP” Then

txtharga.Text = “57000”

ElseIf A = “MNJ” Then

txtharga.Text = “42000”

ElseIf A = “CDR” Then

txtharga.Text = “62000”

ElseIf A = “RPL” Then

txtharga.Text = “75900”

End If

End Sub

data buku 2

RISKA A 2

Private Sub CmdBATAL_Click()

 

txtkode.SetFocus

 

txtkode.Text = “”

 

txtjudul.Text = “”

 

txtpengarang.Text = “”

 

txttahun.Text = “”

 

txtpenerbit.Text = “”

 

txtharga.Text = “”

 

End Sub

 

Private Sub CmdKELUAR_Click()

 

Unload Me

 

End Sub

 

Private Sub CmdLAGI_Click()

 

txtkode.SetFocus

 

txtkode.Text = “”

 

txtjudul.Text = “”

 

txtpengarang.Text = “”

 

txttahun.Text = “”

 

txtpenerbit.Text = “”

 

txtharga.Text = “”

 

End Sub

 

Private Sub CmdPROSES_Click()

 

Dim A As String

 

txttahun.Text = “20” & Right(txtkode.Text, 2)

 

A = Mid(txtkode.Text, 3, 3)

 

If A = “SIM” Then

 

txtjudul.Text = “SISTEM INFORMASI MANAJEMEN”

 

ElseIf A = “EDP” Then

 

txtjudul.Text = “ELEKTRONIK DATA PROCESSING”

 

ElseIf A = “MNJ” Then

 

txtjudul.Text = “MANAJEMEN”

 

ElseIf A = “CDR” Then

 

txtjudul.Text = “CORELDRAW”

 

ElseIf A = “RPL” Then

 

txtjudul.Text = “REKAYASA PERANGKAT LUNAK”

 

End If

 

A = Left(txtkode.Text, 1)

 

If A = “A” Then

 

txtpenerbit.Text = “ANDI OFSSET YOGYAKARTA”

 

ElseIf A = “I” Then

 

txtpenerbit.Text = “INDAH SURABAYA”

 

ElseIf A = “S” Then

 

txtpenerbit.Text = “SALEMBA”

 

ElseIf A = “E” Then

 

txtpenerbit.Text = “ELEK MEDIA KOMPUTINDO”

 

ElseIf A = “M” Then

 

txtpenerbit.Text = “MAXICOM”

 

End If

 

A = Mid(txtkode.Text, 3, 3)

 

If A = “SIM” Then

 

txtpengarang.Text = ” ANDRA SETIAWAN”

 

ElseIf A = “EDP” Then

 

txtpengarang.Text = “DESI ISTIQOMAH”

 

ElseIf A = “MNJ” Then

 

txtpengarang.Text = “SANDY FITRAJAYA”

 

ElseIf A = “CDR” Then

 

txtpengarang.Text = “TRI INDAH SARI”

 

ElseIf A = “RPL” Then

 

txtpengarang.Text = “ERNITA”

 

End If

 

A = Mid(txtkode.Text, 3, 3)

 

If A = “SIM” Then

 

txtharga.Text = “83000”

 

ElseIf A = “EDP” Then

 

txtharga.Text = “57000”

 

ElseIf A = “MNJ” Then

 

txtharga.Text = “42000”

 

ElseIf A = “CDR” Then

 

txtharga.Text = “62000”

 

ElseIf A = “RPL” Then

 

txtharga.Text = “75900”

 

End If

 

End Sub

 

tugas vb data buku 1

RISKA A 1

Private Sub CmdBATAL_Click()

 

txtkode.SetFocus

 

txtkode.Text = “”

 

txtjudul.Text = “”

 

txtpengarang.Text = “”

 

txttahun.Text = “”

 

txtpenerbit.Text = “”

 

txtharga.Text = “”

 

End Sub

 

Private Sub CmdKELUAR_Click()

 

Unload Me

 

End Sub

 

Private Sub CmdLAGI_Click()

 

txtkode.SetFocus

 

txtkode.Text = “”

 

txtjudul.Text = “”

 

txtpengarang.Text = “”

 

txttahun.Text = “”

 

txtpenerbit.Text = “”

 

txtharga.Text = “”

 

End Sub

 

Private Sub CmdPROSES_Click()

 

Dim A As String

 

txttahun.Text = “20” & Right(txtkode.Text, 2)

 

A = Mid(txtkode.Text, 3, 3)

 

If A = “SIM” Then

 

txtjudul.Text = “SISTEM INFORMASI MANAJEMEN”

 

ElseIf A = “EDP” Then

 

txtjudul.Text = “ELEKTRONIK DATA PROCESSING”

 

ElseIf A = “MNJ” Then

 

txtjudul.Text = “MANAJEMEN”

 

ElseIf A = “CDR” Then

 

txtjudul.Text = “CORELDRAW”

 

ElseIf A = “RPL” Then

 

txtjudul.Text = “REKAYASA PERANGKAT LUNAK”

 

End If

 

A = Left(txtkode.Text, 1)

 

If A = “A” Then

 

txtpenerbit.Text = “ANDI OFSSET YOGYAKARTA”

 

ElseIf A = “I” Then

 

txtpenerbit.Text = “INDAH SURABAYA”

 

ElseIf A = “S” Then

 

txtpenerbit.Text = “SALEMBA”

 

ElseIf A = “E” Then

 

txtpenerbit.Text = “ELEK MEDIA KOMPUTINDO”

 

ElseIf A = “M” Then

 

txtpenerbit.Text = “MAXICOM”

 

End If

 

A = Mid(txtkode.Text, 3, 3)

 

If A = “SIM” Then

 

txtpengarang.Text = ” ANDRA SETIAWAN”

 

ElseIf A = “EDP” Then

 

txtpengarang.Text = “DESI ISTIQOMAH”

 

ElseIf A = “MNJ” Then

 

txtpengarang.Text = “SANDY FITRAJAYA”

 

ElseIf A = “CDR” Then

 

txtpengarang.Text = “TRI INDAH SARI”

 

ElseIf A = “RPL” Then

 

txtpengarang.Text = “ERNITA”

 

End If

 

A = Mid(txtkode.Text, 3, 3)

 

If A = “SIM” Then

 

txtharga.Text = “83000”

 

ElseIf A = “EDP” Then

 

txtharga.Text = “57000”

 

ElseIf A = “MNJ” Then

 

txtharga.Text = “42000”

 

ElseIf A = “CDR” Then

 

txtharga.Text = “62000”

 

ElseIf A = “RPL” Then

 

txtharga.Text = “75900”

 

End If

 

End Sub

 

RISKA A PT

Private Sub CMDBATAL_Click()

 

TXTINPUT.SetFocus

 

TXTINPUT.Text = “”

 

TXTNIK.Text = “”

 

End Sub

 

 

 

Private Sub CMDEXIT_Click()

 

Unload Me

 

End Sub

 

 

 

Private Sub CMDLAGI_Click()

 

TXTINPUT.SetFocus

 

TXTGOLONGAN.Text = “”

 

TXTJABATAN.Text = “”

 

TXTTUNJANGAN.Text = “”

 

TXTGAPOK.Text = “”

 

TXTTOGA.Text = “”

 

TXTNIK.Text = “”

 

TXTTERBILANG.Text = “”

 

TXTBAGIAN.Text = “”

 

TXTTAHUN.Text = “”

 

TXTKODE.Text = “”

 

TXTSTATUS.Text = “”

 

End Sub

 

 

 

Private Sub CMDPROSES_Click()

 

Dim NIK As String

 

NIK = Mid(TXTNIK.Text, 5, 1)

 

If NIK = “A” Then

 

TXTGOLONGAN = “A”

 

TXTJABATAN = “MANAJER”

 

TXTTUNJANGAN = “1025000”

 

TXTGAPOK = “4000000”

 

ElseIf NIK = “B” Then

 

TXTGOLONGAN = “B”

 

TXTJABATAN = “KA SEKSI”

 

TXTTUNJANGAN = “975000”

 

TXTGAPOK = “3500000”

 

ElseIf NIK = “C” Then

 

TXTGOLONGAN = “C”

 

TXTJABATAN = “STAFF”

 

TXTTUNJANGAN = “925000”

 

TXTGAPOK = “3000000”

 

End If

 

TXTTOGA = Val(TXTGAPOK.Text) + Val(TXTTUNJANGAN.Text)

 

NIK = Left(TXTNIK.Text, 4)

 

TXTTAHUN.Text = NIK

 

NIK = Mid(TXTNIK.Text, 9, 3)

 

If NIK = “KEU” Then

 

TXTBAGIAN = “ACCOUNTING”

 

ElseIf NIK = “ADM” Then

 

TXTBAGIAN = “ADMINISTRASI”

 

ElseIf NIK = “SDM” Then

 

TXTBAGIAN = “GENERAL AFFAIR”

 

ElseIf NIK = “EDP” Then

 

TXTBAGIAN = “IT UNIT”

 

ElseIf NIK = “SPM” Then

 

TXTBAGIAN = “SECURITY”

 

End If

 

NIK = Mid(TXTNIK.Text, 7, 1)

 

If NIK = “S” Then

 

TXTKODE = “S”

 

TXTSTATUS = “SINGLE”

 

ElseIf NIK = “M” Then

 

TXTKODE = “M”

 

TXTSTATUS = “MENIKAH”

 

ElseIf NIK = “D” Then

 

TXTKODE = “D”

 

TXTSTATUS = “DUDA”

 

ElseIf NIK = “J” Then

 

TXTKODE = “J”

 

TXTSTATUS = “JANDA”

 

End If

 

End Sub

 

 

 

 

 

 

 

 

 

Private Sub TXTTOGA_Change()

 

TXTTERBILANG.Text = terbilang(Val(TXTTOGA.Text))

 

End Sub

 

Private Function KeKata(Nomor)

 

TrjKata = Array(“”, “satu”, “dua”, “tiga”, “empat”, “lima”, “enam”, “tujuh”, “delapan”, “sembilan”)

 

KeKata = TrjKata(Nomor)

 

End Function

 

Public Function terbilang(Nilai_Angka, Optional Style = 4, Optional Satuan = “”)

 

Angka = Fix(Abs(Nilai_Angka))

 

des1 = Mid(Abs(Nilai_Angka), Len(Angka) + 2, 1)

 

des2 = Mid(Abs(Nilai_Angka), Len(Angka) + 3, 1)

 

If des2 = “” Then

 

If des1 = “” Or des1 = “0” Then

 

Koma = “”

 

Else

 

Koma = “koma” & KeKata(des1)

 

End If

 

ElseIf des2 = “0” Then

 

If des1 = “0” Then

 

Koma = “”

 

ElseIf des1 = “1” Then

 

Koma = “koma sepuluh”

 

Else

 

Koma = “koma” & KeKata(des1) & “puluh”

 

End If

 

Else

 

If des1 = “0” Then

 

Koma = “koma nol” & KeKata(des2)

 

ElseIf des1 = “1” Then

 

If des2 = “1” Then

 

Koma = “koma sebelas”

 

Else

 

Koma = “koma” & KeKata(des2) & “belas”

 

End If

 

Else

 

Koma = “koma” & KeKata(des1) & “puluh” & KeKata(des2)

 

End If

 

End If

 

No1 = Left(Right(Angka, 1), 1)

 

No2 = Left(Right(Angka, 2), 1)

 

No3 = Left(Right(Angka, 3), 1)

 

No4 = Left(Right(Angka, 4), 1)

 

No5 = Left(Right(Angka, 5), 1)

 

No6 = Left(Right(Angka, 6), 1)

 

No7 = Left(Right(Angka, 7), 1)

 

No8 = Left(Right(Angka, 8), 1)

 

No9 = Left(Right(Angka, 9), 1)

 

No10 = Left(Right(Angka, 10), 1)

 

No11 = Left(Right(Angka, 11), 1)

 

No12 = Left(Right(Angka, 12), 1)

 

No13 = Left(Right(Angka, 13), 1)

 

No14 = Left(Right(Angka, 14), 1)

 

No15 = Left(Right(Angka, 15), 1)

 

If Len(Angka) >= 1 Then

 

If Len(Angka) = 1 And No1 = 1 Then

 

Nomor1 = “satu”

 

ElseIf Len(Angka) = 1 And No1 = 0 Then

 

Nomor1 = “Nol”

 

ElseIf No2 = “1” Then

 

If No1 = “1” Then

 

Nomor1 = “sebelas”

 

ElseIf No1 = “0” Then

 

Nomor1 = “sepuluh”

 

Else

 

Nomor1 = KeKata(No1) & “belas”

 

End If

 

Else

 

Nomor1 = KeKata(No1)

 

End If

 

Else

 

Nomor1 = “”

 

End If

 

If Len(Angka) >= 2 Then

 

If No2 = 1 Or No2 = “0” Then

 

Nomor2 = “”

 

Else

 

Nomor2 = KeKata(No2) & “puluh”

 

End If

 

Else

 

Nomor2 = “”

 

End If

 

If Len(Angka) >= 3 Then

 

If No3 = “1” Then

 

Nomor3 = “seratus”

 

ElseIf No3 = “0” Then

 

Nomor3 = “”

 

Else

 

Nomor3 = KeKata(No3) & “ratus”

 

End If

 

Else

 

Nomor3 = “”

 

End If

 

If Len(Angka) >= 4 Then

 

If No6 = “0” And No5 = “0” And No4 = “0” Then

 

Nomor4 = “”

 

ElseIf (No4 = “1” And Len(Angka) = 4) Or (No6 = “0” And No5 = “0” And No4 = “1”) Then

 

 

 

Nomor4 = “seribu ”

 

ElseIf No5 = “1” Then

 

If No4 = “1” Then

 

Nomor4 = “sebelas ribu”

 

ElseIf No4 = “0” Then

 

Nomor4 = “sepuluh ribu”

 

Else

 

Nomor4 = KeKata(No4) & “belas ribu”

 

End If

 

Else

 

Nomor4 = KeKata(No4) & “ribu”

 

End If

 

Else

 

Nomor4 = “”

 

End If

 

If Len(Angka) >= 5 Then

 

If No5 = “1” Or No5 = “0” Then

 

Nomor5 = “”

 

Else

 

Nomor5 = KeKata(No5) & “puluh”

 

End If

 

Else

 

Nomor5 = “”

 

End If

 

If Len(Angka) >= 6 Then

 

If No6 = “1” Then

 

Nomor6 = “seratus”

 

ElseIf No6 = “0” Then

 

Nomor6 = “”

 

Else

 

Nomor6 = KeKata(No6) & “ratus”

 

End If

 

Else

 

Nomor6 = “”

 

End If

 

If Len(Angka) >= 7 Then

 

If No9 = “0” And No8 = “0” And No7 = “0” Then

 

Nomor7 = “”

 

ElseIf No7 = “1” And Len(Angka) = 7 Then

 

Nomor7 = “satujuta”

 

ElseIf No8 = “1” Then

 

If No7 = “1” Then

 

Nomor7 = “sebelas juta”

 

ElseIf No7 = “0” Then

 

Nomor7 = “sepuluh juta”

 

Else

 

Nomor7 = KeKata(No7) & “belas juta”

 

End If

 

Else

 

Nomor7 = KeKata(No7) & “juta”

 

End If

 

Else

 

Nomor7 = “”

 

End If

 

If Len(Angka) >= 8 Then

 

If No8 = “1” Or No8 = “0” Then

 

Nomor8 = “”

 

Else

 

Nomor8 = KeKata(No8) & “puluh”

 

End If

 

Else

 

Nomor8 = “”

 

End If

 

If Len(Angka) >= 9 Then

 

If No9 = “1” Then

 

Nomor9 = “seratus”

 

ElseIf No9 = “0” Then

 

Nomor9 = “”

 

Else

 

Nomor9 = KeKata(No9) & “ratus”

 

End If

 

Else

 

Nomor9 = “”

 

End If

 

If Len(Angka) >= 10 Then

 

If No12 = “0” And No11 = “0” And No10 = “0” Then

 

Nomor10 = “”

 

ElseIf No10 = “1” And Len(Angka) = 10 Then

 

Nomor10 = “satu milyar”

 

ElseIf No11 = “1” Then

 

If No10 = “1” Then

 

Nomor10 = “sebelas milyar”

 

ElseIf No10 = “0” Then

 

Nomor10 = “sepuluh milyar”

 

Else

 

Nomor10 = KeKata(No10) & “belas milyar”

 

End If

 

Else

 

Nomor10 = KeKata(No10) & “milyar”

 

End If

 

Else

 

Nomor10 = “”

 

End If

 

If Len(Angka) >= 11 Then

 

If No11 = “1” Or No11 = “0” Then

 

Nomor11 = “”

 

Else

 

Nomor11 = KeKata(No11) & “puluh”

 

End If

 

Else

 

Nomor11 = “”

 

End If

 

If Len(Angka) >= 12 Then

 

If No12 = “1” Then

 

Nomor12 = “seratus”

 

ElseIf No12 = “0” Then

 

Nomor12 = “”

 

Else

 

Nomor12 = KeKata(No12) & “ratus”

 

End If

 

Else

 

Nomor12 = “”

 

End If

 

If Len(Angka) >= 13 Then

 

If No15 = “0” And No14 = “0” And No13 = “0” Then

 

Nomor13 = “”

 

ElseIf No13 = “1” And Len(Angka) = 13 Then

 

Nomor13 = “satu triliun”

 

ElseIf No14 = “1” Then

 

If No13 = “1” Then

 

Nomor13 = “sebelas triliun”

 

ElseIf No13 = “0” Then

 

Nomor13 = “sepuluh triliun”

 

Else

 

Nomor13 = KeKata(No13) & “belas triliun”

 

End If

 

Else

 

Nomor13 = KeKata(No13) & “triliun”

 

End If

 

Else

 

Nomor13 = “”

 

End If

 

If Len(Angka) >= 14 Then

 

If No14 = “1” Or No14 = “0” Then

 

Nomor14 = “”

 

Else

 

Nomor14 = KeKata(No14) & “puluh”

 

End If

 

Else

 

Nomor14 = “”

 

End If

 

If Len(Angka) >= 15 Then

 

If No15 = “1” Then

 

Nomor15 = “seratus”

 

ElseIf No15 = “0” Then

 

Nomor15 = “”

 

Else

 

Nomor15 = KeKata(No15) & “ratus”

 

End If

 

Else

 

Nomor15 = “”

 

End If

 

If Len(Angka) >= 15 Then

 

bilang = “Digit Angka Terlalu Banyak”

 

Else

 

If IsNull(Nilai_Angka) Then

 

bilang = “”

 

ElseIf Nilai_Angka <= 0 Then

 

bilang = “minus” & Trim(Nomor15 & Nomor14 & Nomor13 & Nomor12 & Nomor11 & Nomor10 & Nomor9 & Nomor8 & Nomor7 _

 

& Nomor6 & Nomor5 & Nomor4 & Nomor3 & Nomor2 & Nomor1 & Koma & “” & Satuan)

 

Else

 

bilang = Trim(Nomor15 & Nomor14 & Nomor13 & Nomor12 & Nomor11 & Nomor10 & Nomor9 & Nomor8 & Nomor7 _

 

& Nomor6 & Nomor5 & Nomor4 & Nomor3 & Nomor2 & Nomor1 & Koma & “” & Satuan)

 

End If

 

End If

 

If Style = 4 Then

 

terbilang = StrConv(Left(bilang, 1), 1) & StrConv(Mid(bilang, 2, 1000), 2)

 

Else

 

terbilang = StrConv(bilang, Style)

 

End If

 

terbilang = Replace(terbilang, ” “, ” “, 1, 1000, vbTextCompare)

 

End Function

 

RISKA A DATA

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

 

If KeyAscii = 13 Then

 

txtnpm.SetFocus

 

End If

 

End Sub

 

 

 

Private Sub Cmdproses_Click()

 

Dim St As String

 

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

 

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

 

If St = “1” Then

 

txtjurusan.Text = “Sistem Informasi”

 

ElseIf St = “2” Then

 

txtjurusan.Text = “Manajemen Informasi”

 

ElseIf St = “3” Then

 

txtjurusan.Text = “Komputer Akuntansi”

 

ElseIf St = “4” Then

 

txtjurusan.Text = “Tehnik Informatika”

 

End If

 

 

 

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

 

If St = “00” Then

 

txtprogram.Text = “Strata Satu”

 

ElseIf St = “01” Then

 

txtprogram.Text = “Diploma Tiga”

 

ElseIf St = “02” Then

 

 

 

txtprogram.Text = “Diploma Dua”

 

ElseIf St = “03” Then

 

txtprogram.Text = “Diploma Empat”

 

End If

 

St = Right(txtnpm.Text, 3)

 

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

 

End Sub

 

 

 

Private Sub Cmdlagi_Click()

 

txtnama.SetFocus

 

txtnama = “”

 

txtnpm = “”

 

Txtjrs = “”

 

Txtpst = “”

 

Txtthn = “”

 

Txtnur = “”

 

End Sub

 

 

 

Private Sub Cmdbatal_Click()

 

txtnama.SetFocus

 

txtnama = “”

 

txtnpm = “”

 

Txtjrs = “”

 

Txtpst = “”

 

Txtthn = “”

 

Txtnur = “”

 

End Sub

 

Private Sub Cmdkeluar_Click()

 

End

 

End Sub

 

RISKA LABEL

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

 

RISKA A NAMA

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

 

Aside

Image

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

Aside

Image

Private 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.Text = 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

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub