DATA BASE

Gambar

Private Sub cmdproses_Click()
kode = Mid(txtnpm.Text, 3, 1)
If kode = “1” Then
txtjur.Text = “Sistem Informasi Manajemen”
ElseIf kode = “2” Then
txtjur.Text = “Manajemen Informatika”
ElseIf kode = “3” Then
txtjur.Text = “Tehnik Informatika”
ElseIf kode = “4” Then
txtjur.Text = “Komputer Akutansi”
End If
txtnpm.SetFocus
kode = Mid(txtnpm.Text, 4, 2)
If kode = “01” Then
txtprodi.Text = “Strata Satu”
ElseIf kode = “02” Then
txtprodi.Text = “Diploma Empat”
ElseIf kode = “03” Then
txtprodi.Text = ” Diploma Tiga”
ElseIf kode = “04” Then
txtprodi.Text = “Diploma Dua”
End If
txttm.Text = “20” & Left(txtnpm.Text, 2)
txtno.Text = Right(txtnpm.Text, 3)

End Sub

Private Sub Command1_Click()
Data1.Recordset.AddNew
txtnama.SetFocus
txtnama.Text = “”
txtnpm.Text = “”
txtjur.Text = “”
txtprodi.Text = “”
txttm.Text = “”
txtno.Text = “”

End Sub

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

Private Sub Command3_Click()
Data1.Recordset.Delete
Data1.Recordset.AddNew
txtnama.SetFocus
txtnama.Text = “”
txtnpm.Text = “”
txtjur.Text = “”
txtprodi.Text = “”
txttm.Text = “”
txtno.Text = “”
End Sub

Private Sub Command4_Click()
End
End Sub

 

VB COMBOO

Gambar

 

Private Sub cmdbatal_Click()
cbokode.SetFocus
cbokode.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()
cbokode.SetFocus
cbokode.Text = “”
txtjudul.Text = “”
txtpengarang.Text = “”
txttahun.Text = “”
txtpenerbit.Text = “”
txtharga.Text = “”
End Sub

Private Sub cmdproses_Click()
Dim a As String

a = Left(cbokode.Text, 1)
If a = “A” Then
txtpenerbit.Text = “Andi Offset Yogyakarta”
ElseIf a = “I” Then
txtpenerbit.Text = “Indah Surabaya”
ElseIf a = “S” Then
txtpenerbit.Text = “Salemba Empat”
ElseIf a = “E” Then
txtpenerbit.Text = “Elek Media Komputindo”
ElseIf a = “M” Then
txtpenerbit.Text = “Maxicom”
End If

a = Mid(cbokode.Text, 3, 3)
If kode = “SIM” Then
txtjudul.Text = “Sistem Informasi Manajemen”
txtpengarang.Text = “Yati Nur Oktavia”
txtharga.Text = “75900”
ElseIf a = “EDP” Then
txtjudul.Text = “Elektronik Data Proses”
txtpengarang.Text = “Imam Tarmizi”
txtharga.Text = “62000”
ElseIf a = “MNJ” Then
txtjudul.Text = “Manajemen”
txtpengarang.Text = “M.rizal sobri”
txtharga.Text = “42000”
ElseIf a = “CRD” Then
txtjudul.Text = “Corel Draw”
txtpengarang.Text = “Riyan Suhandi”
txtharga.Text = “453000”
ElseIf a = “RPL” Then
txtjudul.Text = “Rekayasa Perangkat Lunak”
txtpengarang.Text = “Sinta umpu singa”
txtharga.Text = “83000”
End If
txttahun.Text = “20” & Right(cbokode.Text, 2)
End Sub

Private Sub Form_Load()
cbokode.AddItem “A-SIM-01”
cbokode.AddItem “I-EDP-02”
cbokode.AddItem “S-MNJ-03”
cbokode.AddItem “E-CRD-04”
cbokode.AddItem “M-RPL-05”
End Sub

 

DATA BUKU STMIK PRINGSEWU

Gambar

Private Sub Text4_Change()

End Sub

Private Sub cmdbatal_Click()
txtkode.SetFocus
txtkode.Text = “”
txtjudul.Text = “”
txtpenggarang.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 = “”
txtpenggarang.Text = “”
txttahun.Text = “”
txtpenerbit.Text = “”
txtharga.Text = “”
End Sub

Private Sub cmdproses_Click()
kode = Mid(txtkode.Text, 3, 3)
If kode = “SIM” Then
txtjudul.Text = “sistem informasi manejemen”
txtpenggarang.Text = “Andra setiawan”
txtharga.Text = “75900”
ElseIf kode = “ESP” Then
txtjudul.Text = “elektronik data orosessing”
txtpenggarang.Text = “Desi Istiqomah”
txtharga.Text = “62000”
ElseIf kode = “MNJ” Then
txtjudul.Text = “Manejemen”
txtpenggarang.Text = “Sandy fitrajaya”
txtharga.Text = “42000”
ElseIf kod = “CDR” Then
txtjudul.Text = “Corel Draw”
txtpenggarang.Text = “\Tri Indah Sari”
txtharga.Text = “53000”
ElseIf kode = “RPL” Then
txtjudul.Text = “Rekayasa Perangkat Lunak”
txtpenggarang.Text = “Errita Sari”
txtharga.Text = “83000”
End If
kode = Left(txtkode.Text, 1)
If kode = “A” Then
txtpenerbit.Text = “Andi Offiset Yogyakarta”
ElseIf kode = “I” Then
txtpenerbit.Text = “Indah Surabaya”
ElseIf kode = “S” Then
txtpenerbit.Text = “Salemba Empat”
ElseIf kode = ” E” Then
txtpenerbit.Text = ” Elek Media Komputindo”
ElseIf kode = “M” Then
txtpenerbit.Text = “Maxicom”
End If

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

PT.PULANG PETANG

Gambar

 

Private Sub Command1_Click()
Dim a, GOLONGAN, KODESTATUS, STATUS, JABATAN, BAGIAN, GAJIPOKOK, TUNJANGAN, totalgaji, asstring
Text4.Text = “” & Left(Text11.Text, 4)
a = Mid(Text11.Text, 5, 1)
If a = “A” Then
GOLONGAN = “A”
ElseIf a = “B” Then
GOLONGAN = “B”
ElseIf a = “C” Then
GOLONGAN = “C”
End If
Text1.Text = GOLONGAN
a = Mid(Text11.Text, 5, 1)
If a = “A” Then
JABATAN = “MANAJER”
ElseIf a = “B” Then
JABATAN = “Ka Seksi”
ElseIf a = “C” Then
JABATAN = “Staff”
End If
Text5.Text = JABATAN
a = Mid(Text11.Text, 5, 1)
If a = “A” Then
GAJIPOKOK = “4000000”
ElseIf a = “B” Then
GAJIPOKOK = “3500000”
ElseIf a = “C” Then
GAJIPOKOK = “3000000”
End If
Text7.Text = GAJIPOKOK
a = Mid(Text11.Text, 5, 1)
If a = “A” Then
TUNJANGAN = “1025000”
ElseIf a = “B” Then
TUNJANGAN = “975000”
ElseIf a = “C” Then
TUNJANGAN = “925000”
End If
Text8.Text = TUNJANGAN
a = Mid(Text11.Text, 7, 1)
If a = “S” Then
KODESTATUS = “S”
ElseIf a = “M” Then
KODESTATUS = “M”
ElseIf a = “J” Then
KODESTATUS = “J”
ElseIf a = “D” Then
KODESTATUS = “D”
End If
Text2.Text = KODESTATUS
a = Mid(Text11.Text, 7, 1)
If a = “S” Then
STATUS = “single”
ElseIf a = “M” Then
STATUS = “menikah”
ElseIf a = “J” Then
STATUS = “janda”
ElseIf a = “D” Then
STATUS = “duda”
End If
Text3.Text = STATUS
a = Right(Text11.Text, 3)
If a = “KEU” Then
BAGIAN = “Accounting”
ElseIf a = “ADM” Then
BAGIAN = “Administrasi”
ElseIf a = “SDM” Then
BAGIAN = “General Affair”
ElseIf a = “EDP” Then
BAGIAN = “IP Unit”
ElseIf a = “SPM” Then
BAGIAN = “Security”
End If
Text6.Text = BAGIAN
Text9.Text = Val(Text7.Text) + Val(Text8.Text)
End Sub

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

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

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Text10_keypress(keyascii As Integer)
If keyascii = 13 Then
Text11.SetFocus
End If
End Sub

 

penjualan 1

Gambar

Private Sub Command1_Click()
Dim a, judulbuku, pengarang, penerbiT, asstring
Text4.Text = “20” & Mid(text1.Text, 5, 2)
a = Left(text1.Text, 3)
If a = “sim” Then
judulbuku = “sistem informasi menejemen”
ElseIf a = “edp” Then
judulbuku = “elektronik data processing”
ElseIf a = “mnj” Then
judulbuku = “manajemen”
ElseIf a = “cdr” Then
judulbuku = “coreldraw”
ElseIf a = “rlp” Then
judulbuku = “rekayasa perangkat lunak”
End If
Text2.Text = judulbuku
a = Left(text1.Text, 3)
If a = “sim” Then
pengarang = “m.rizal sobri”
ElseIf a = “edp” Then
pengarang = “desti istiqoma”
ElseIf a = “mnj” Then
pengarang = “sandi fitra jaya”
ElseIf a = “cdr” Then
pengarang = “tri indah sari”
ElseIf a = “rlp” Then
pengarang = “ernita sari”
End If
Text3.Text = pengarang
a = Left(text1.Text, 3)
If a = “sim” Then
harga = “75900”
ElseIf a = “edp” Then
harga = “62000”
ElseIf a = “mnj” Then
harga = “43000”
ElseIf a = “cdr” Then
harga = “53000”
ElseIf a = “rlp” Then
harga = “83000”
End If
Text6.Text = harga
a = Right(text1.Text, 1)
If a = “a” Then
penerbiT = “andi offset yogyakarta”
ElseIf a = “i” Then
penerbiT = “indah surabaya”
ElseIf a = “s” Then
penerbiT = “salemba empat”
ElseIf a = “e” Then
penerbiT = “elek media komputindo”
ElseIf a = “m” Then
penerbiT = “maxicom”
Text5.Text = penerbiT
End If
End Sub

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

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

Private Sub Command4_Click()
End
End Sub

Private Sub cmdproses_Click()

End Sub

TUGAS 3 VB 3

Gambar

Private Sub txtnama_keypress(keyAScii As Integer)
If keyAScii = 13 Then
txtnpm.SetFocus
End If
End Sub
Private Sub cmdproses_click()
Dim A, jr, ps As String
txttahun.Text = “20” & Left(txtnpm.Text, 2)
A = Mid(txtnpm.Text, 3, 1)
If A = “1” Then
jr = “sistem informasi”
ElseIf A = “2” Then
jr = “manajemen informatika”
ElseIf A = “3” Then
jr = “teknik informasi”
ElseIf A = “4” Then
jr = “komputer akuntansi”
End If
txtjurusan.Text = jr
A = Mid(txtnpm.Text, 4, 2)
If A = “00” Then
ps = “strata satu”
ElseIf A = “01” Then
ps = “diploma empat”
ElseIf A = “02” Then
ps = “diploma tiga”
ElseIf A = “03” Then
ps = “diploma dua”
End If
Txtps.Text = ps
txturut.Text = Right(txtnpm.Text, 3)
End Sub
Private Sub cmdlagi_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
txtjurusan = “”
Txtps = “”
txttahun = “”
txturut = “”
End Sub
Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama = “”
txtnpm = “”
txtjurusan = “”
Txtps = “”
txttahun = “”
txturut = “”
End Sub
Private Sub cmdkeluar_Click()
Unload Me
End Sub

 

 

 

 

 

 

 

 

 

 

 

 

Tugas 3 VB 2

Gambar

Private Sub optRed_Click()
lblteks.ForeColor = vbRed
End Sub
Private Sub optgreen_Click()
lblteks.ForeColor = vbGreen
End Sub
Private Sub Optblue_Click()
lblteks.ForeColor = vbBlue
End Sub
Private Sub Optyellow_Click()
lblteks.ForeColor = vbYellow
End Sub
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 chkunderline_Click()
If Chkunderline.Value = 1 Then
lblteks.FontUnderline = True
Else
lblteks.FontUnderline = False
End If
End Sub
Private Sub chkstrikeout_Click()
If chkstrikeout.Value = 1 Then
lblteks.FontStrikeout = True
Else
lblteks.FontStrikeout = False
End If
End Sub
Private Sub cmdexit_Click()
Unload Me
End Sub