DATA BASE

RINI

Private Sub Command1_Click()

Data1.Recordset.Update

End Sub

 

Private Sub Command2_Click()

Data1.Recordset.AddNew

Text1.SetFocus

End Sub

 

 

 

Private Sub Command3_Click()

End

End Sub

 

Advertisements

tugas 6

riniv

 

Private Sub cmdbatal_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtkel.Text = “”

txtjur.Text = “”

txtpro.Text = “”

txtthn.Text = “”

txtno.Text = “”

txtup.Text = “”

txtbipes.Text = “”

txtub.Text = “”

txtbipa.Text = “”

txttot.Text = “”

End Sub

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtkel.Text = “”

txtjur.Text = “”

txtpro.Text = “”

txtthn.Text = “”

txtno.Text = “”

txtup.Text = “”

txtbipes.Text = “”

txtub.Text = “”

txtbipa.Text = “”

txttot.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Dim eksekutif, reguler, tahun, jurusan, study, kelas, no As String

n = Left(txtnpm.Text, 1)

If n = “E” Or n = “e” Then

kelas = “Eksekutif”

bangunan = “1250000”

ElseIf n = “R” Or n = “r” Then

kelas = “Reguler”

bangunan = “1000000”

End If

property = “600000”

txtbipa.Text = property

txtub.Text = bangunan

tahun = “20” & Mid(txtnpm.Text, 3, 2)

txtthn.Text = tahun

txtkel.Text = kelas

n = Mid(txtnpm.Text, 5, 1)

If n = “1” Then

jurusan = “Sistem Informasi”

ElseIf n = “2” Then

jurusan = “Manajemen Informatika”

ElseIf n = “3” Then

jurusan = “Manajemen dan Kom. Akuntansi”

End If

txtjur.Text = jurusan

n = Mid(txtnpm.Text, 6, 2)

If n = “01” Or n = “00” Then

study = “Strata Satu”

biaya = “200000”

ElseIf n = “02” Then

study = “Diploma Tiga”

biaya = “150000”

ElseIf n = “03” Then

study = “Diploma Satu”

biaya = “150000”

End If

If kelas = “Eeksekutif” And study = “strata satu” Then

pendidikan = “1900000”

ElseIf kelas = “Eeksekutif” And study = “Diploma Tiga” Then

pendidikan = “1650000”

ElseIf kelas = “Eeksekutif” And study = “Diploma satu” Then

pendidikan = “1350000”

ElseIf kelas = “Reguler” And study = “Strata Satu” Then

pendidikan = “1500000”

ElseIf kelas = “Reguler” And study = “Diploma Tiga” Then

pendidikan = “1250000”

ElseIf kelas = “Reguler” And study = “Diploma Satu” Then

pendidikan = “1250000”

 

End If

txtkel.Text = kelas

txtpro.Text = study

txtbipes.Text = pendidikan

 

no = Right(txtnpm.Text, 3)

txtno.Text = no

txtup.Text = biaya

txttot.Text = Val(txtup.Text) + Val(txtbipes.Text) + Val(txtub.Text) + Val(txtbipa.Text)

 

 

End Sub

 

 

 

Private Sub txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnpm.SetFocus

End If

End Sub

vb

r

Private Sub cbokode_Click()
txtjj.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim penjualan, discount, kode, merk, bayar, a, b As String
Dim harga As Variant

kode = Mid(cbokode.Text, 7, 5)
If kode = “MC965″ Then
merk = “Apple MacBook Air MC965″
harga = “12800000″
ElseIf kode = “MC966″ Then
merk = “Apple MacBook Air MC966″
harga = “15800000″
ElseIf kode = “MC968″ Then
merk = “Apple MacBook Air MC968″
harga = “9900000″
ElseIf kode = “MC969″ Then
merk = “Apple MacBook Air MC969″
harga = “11900000″
ElseIf kode = “MC700″ Then
merk = “Apple MacBook Air MC700″
harga = “10800000″
ElseIf kode = “MC721″ Then
merk = “Apple MacBook Air MC721″
harga = “15900000″
ElseIf kode = “MC723″ Then
merk = “Apple MacBook Air MC723″
harga = “19300000″
ElseIf kode = “MC724″ Then
merk = “Apple MacBook Air MC724″
harga = “13700000″
ElseIf kode = “MC311″ Then
merk = “Apple MacBook Air MC311″
harga = “24200000″
ElseIf kode = “MC313″ Then
merk = “Apple MacBook Air MC313″
harga = “11900000″
ElseIf kode = “MC314″ Then
merk = “Apple MacBook Air MC314″
harga = “14700000″
ElseIf kode = “MC318″ Then
merk = “Apple MacBook Air MC318″
harga = “17600000″
ElseIf kode = “MC322″ Then
merk = “Apple MacBook Air MC322″
harga = “21300000″
ElseIf kode = “MC965″ Then
merk = “Apple MacBook Air MC965″
harga = “12800000″
ElseIf kode = “MC966″ Then
merk = “Apple MacBook Air MC966″
harga = “15800000″
End If
txtmerk.Text = merk
txths.Text = harga

a = Val(txtjj.Text)
b = Val(txths.Text)
penjualan = a * b
txthp.Text = penjualan

Select Case txthp.Text
Case Is > 140000000
discount = 0.15 * penjualan
Case Is > 135000000
discount = 0.1 * penjualan
Case Is > 130000000
discount = 0.05 * penjualan
Case Is > 125000000
discount = 0.02 * penjualan
End Select
penjualan = Val(txthp.Text)
txtdis.Text = discount

txttb.Text = Val(txthp.Text) – Val(txtdis.Text)

End Sub

Private Sub cmdlagi_Click()
cbokode.SetFocus
cbokode.Text = “”
txtmerk.Text = “”
txths.Text = “”
txtjj.Text = “”
txtdis.Text = “”
txttb.Text = “”
txthp.Text = “”

End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub Form_Load()
cbokode.AddItem “Apple MC965 MasBook Air”
cbokode.AddItem “Apple MC966 MasBook Air”
cbokode.AddItem “Apple MC968 MasBook Air”
cbokode.AddItem “Apple MC969 MasBook Air”
cbokode.AddItem “Apple MC700 MasBook Pro”
cbokode.AddItem “Apple MC721 MasBook Pro”
cbokode.AddItem “Apple MC723 MasBook Pro”
cbokode.AddItem “Apple MC724 MasBook Pro”
cbokode.AddItem “Apple MC311 MasBook Pro”
cbokode.AddItem “Apple MC313 MasBook Pro”
cbokode.AddItem “Apple MC314 MasBook Pro”
cbokode.AddItem “Apple MC318 MasBook Pro”
cbokode.AddItem “Apple MC322 MasBook Pro”
cbokode.AddItem “Apple MC965 MasBook Air”
cbokode.AddItem “Apple MC966 MasBook Air”
End Sub

rn1

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama.Text = “”
txtnik.Text = “”
txtgol.Text = “”
txtkode.Text = “”
txtstatus.Text = “”
txttahun.Text = “”
txtjabatan.Text = “”
txtbagian.Text = “”
txtgapok.Text = “”
txttunjangan.Text = “”
txttotal.Text = “”
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
txtnama.SetFocus
txtnama.Text = “”
txtnik.Text = “”
txtgol.Text = “”
txtkode.Text = “”
txtstatus.Text = “”
txttahun.Text = “”
txtjabatan.Text = “”
txtbagian.Text = “”
txtgapok.Text = “”
txttunjangan.Text = “”
txttotal.Text = “”
End Sub

Private Sub cmdproses_Click()

Select Case a = Mid(txtnik.Text, 5, 1)
Case a = “A”
txtgol = “A”
txtjabatan.Text = “MANAGER”
txtgapok.Text = “4000000″
txttunjangan.Text = “1025000″
Case a = “B”
txtgol.Text = “B”
txtjabatan.Text = “Ka.SEKSI”
txtgapok.Text = “3500000″
txttunjangan.Text = “975000″
Case a = “C”
txtgol.Text = “C”
txtjabatan.Text = “STAFF”
txtgapok.Text = “3000000″
txttunjangan.Text = “925000″
End Select

a = Right(txtnik.Text, 3)
If a = “KEU” Then
txtbagian.Text = “ACCOUNTING”
ElseIf a = “ADM” Then
txtbagian.Text = “ADMINISTRASI”
ElseIf a = “SDM” Then
txtbagian.Text = “GENERAL AFFAIR”
ElseIf a = “EDP” Then
txtbagian.Text = “IT UNIT”
ElseIf a = “SPM” Then
txtbagian.Text = “SECURITY”
End If

Select Case a = Mid(txtnik.Text, 7, 1)
Case a = “S”
kode = “S”
Status = “SINGEL”
Case a = “M”
kode = “M”
Status = “MENIKAH”
Case a = “J”
kode = “J”
Status = “JANDA”
Case a = “D”
kode = “D”
Status = “DUDA”
End Select
txtkode.Text = kode
txtstatus.Text = Status

txttahun.Text = Left(txtnik.Text, 4)

txttotal.Text = Val(txtgapok.Text) + Val(txttunjangan.Text)
End Sub

Private Sub Form_Activate()
txtnama.SetFocus
End Sub

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnik.SetFocus
End If

End sub

R

Private Sub cmdbersih_Click()
txtbil1.Text = “”
txtbil2.Text = “”
txthasil.Text = “”
End Sub

Private Sub cmdhitung_Click()
txthasil.Text = Val(txtbil1.Text) * Val(txtbil2.Text)
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Koleksi photo Jim Henry spkr.gif (282 bytes) Kepada Jaranireng:  Aku dan Tulisanku

Adakah orang akan bertanya akan aku ketika aku
tak pernah menulis satu kata?
Adakah orang akan mencari namaku ketika aku
tak pernah meninggalkan kesan?
tulisanku adalah diriku, diriku mustahil adalah tulisanku
jari-jariku bekerja dengan otakku
tapi tidak dengan diriku
diriku adalah kumpulan prilaku potensi dosa
diriku adalah susunan tulang daging darah
yang mungkin telah menyerap barang haram
diriku bukan milikku, lingkunganku telah mengklaimnya
A