Tugas Data base

Image

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

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

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

Private Sub Command4_Click()
End
End Sub

Private Sub Command5_Click()
Data1.Recordset.Delete
End Sub
🙂 thank you 🙂

tugas 2 npm

Image

  • Batal

Private Sub cmdbatal_Click()
txtnama.SetFocus
txtnama.Text = “”
txtnpm.Text = “”
txtkelas.Text = “”
txtjurus.Text = “”
txtpro.Text = “”
txttahun.Text = “”
txtno.Text = “”
txtdaftar.Text = “”
txtbiaya.Text = “”
txtbangun.Text = “”
txtpropti.Text = “”
txttotal.Text = “”
End Sub

  • Lagi

Private Sub cmdlagi_Click()
txtnama.SetFocus
txtnama.Text = “”
txtnpm.Text = “”
txtkelas.Text = “”
txtjurus.Text = “”
txtpro.Text = “”
txttahun.Text = “”
txtno.Text = “”
txtdaftar.Text = “”
txtbiaya.Text = “”
txtbangun.Text = “”
txtpropti.Text = “”
txttotal.Text = “”
End Sub

Private Sub Form_Activate()
txtnama.SetFocus
End Sub

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

  • Keluar

Private Sub cmdkeluar_Click()
End
End Sub

  • Proses

Private Sub cmdproses_Click()
Dim a, b As String

a = Left(txtnpm.Text, 1)
If a = “E” Or a = “e” Then
txtkelas.Text = “Eksekutif”
txtbangun.Text = “1250000″
ElseIf a = “R” Or a = “r” Then
txtkelas.Text = “Reguler”
txtbangun.Text = “1000000″
End If

txtpropti.Text = “600000″

a = Mid(txtnpm.Text, 5, 1)
If a = “1″ Then
txtjurus.Text = “Sistem Informasi”
ElseIf a = “2″ Then
txtjurus.Text = “Manajemen Informatika”
ElseIf a = “3″ Then
txtjurus.Text = “Manajemen dan Komp.Akutansi”
End If

a = Mid(txtnpm.Text, 6, 2)
If a = “01″ Then
txtpro.Text = “Strata Satu”
txtdaftar.Text = “200000″
ElseIf a = “02″ Then
txtpro.Text = “Diploma Tiga”
txtdaftar.Text = “150000″
ElseIf a = “03″ Then
txtpro.Text = “Diploma Satu”
txtdaftar.Text = “150000″
End If
txtno.Text = Right(txtnpm.Text, 3)

txttahun.Text = “20″ & Mid(txtnpm.Text, 3, 2)

If txtkelas.Text = “Eksekutif” And txtpro.Text = “Strata Satu” Then
txtbiaya.Text = “1900000″
ElseIf txtkelas.Text = “Eksekutif” And txtpro.Text = “Diploma Tiga” Then
txtbiaya.Text = “1650000″
ElseIf txtkelas.Text = “Eksekutif” And txtpro.Text = “Diploma Satu” Then
txtbiaya.Text = “1350000″
ElseIf txtkelas.Text = “Reguler” And txtpro.Text = “Strata Satu” Then
txtbiaya.Text = “1500000″
ElseIf txtkelas.Text = “Reguler” And txtpro.Text = “Diploma Tiga” Then
txtbiaya.Text = “1250000″
ElseIf txtkelas.Text = “Reguler” And txtpro.Text = “Diploma Satu” Then
txtbiaya.Text = “1250000″
End If

txttotal.Text = Val(txtdaftar.Text) + Val(txtbiaya.Text) + Val(txtbangun.Text) + Val(txtpropti.Text)

End Sub

🙂 thank you 🙂

tugas 1 list

Image

 

 

Private Sub Form_Activate()

 

Dim c As Integer

c = 1

Do While c < 20

c = c + 2

List1.AddItem c

Loop

 

Dim a As Integer

a = 0

Do While a < 20

a = a + 2

List2.AddItem a

Loop

 

Dim b As Integer

For b = 5 To 499 Step 27

List3.AddItem b + 3

Next b

 

End Sub

🙂 thank you 🙂

tugas vb PT. pulang petang

dana petang

Private Sub cmdbatal_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnik.Text = “”

Txtgol.Text = “”

txtkode.Text = “”

txtstatus.Text = “”

txttahun.Text = “”

txtjabatan.Text = “”

txtbagian.Text = “”

txtgapok.Text = “”

txttun.Text = “”

txttoga.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 = “”

txttun.Text = “”

txttoga.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Select Case n = Mid(txtnik.Text, 5, 1)

Case n = “A”

Txtgol = “A”

txtjabatan.Text = “MANAGER”

txtgapok.Text = “4000000”

txttun.Text = “1025000”

Case n = “B”

Txtgol.Text = “B”

txtjabatan.Text = “Ka.SEKSI”

txtgapok.Text = “3500000”

txttun.Text = “975000”

Case n = “C”

Txtgol.Text = “C”

txtjabatan.Text = “STAFF”

txtgapok.Text = “3000000”

txttun.Text = “925000”

End Select

n= Right(txtnik.Text, 3)

If  n = “KEU” Then

txtbagian.Text = “ACCOUNTING”

ElseIf n = “ADM” Then

txtbagian.Text = “ADMINISTRASI”

ElseIf n = “SDM” Then

txtbagian.Text = “GENERAL AFFAIR”

ElseIf n = “EDP” Then

txtbagian.Text = “IT UNIT”

ElseIf n = “SPM” Then

txtbagian.Text = “SECURITY”

End If

Select Case n = Mid(txtnik.Text, 7, 1)

Case n = “S”

kode = “S”

Status = “SINGEL”

Case n= “M”

kode = “M”

Status = “MENIKAH”

Case n = “J”

kode = “J”

Status = “JANDA”

Case n = “D”

kode = “D”

Status = “DUDA”

End Select

txtkode.Text = kode

txtstatus.Text = Status

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

txttoga.Text = Val(txtgapok.Text) + Val(txttun.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

 

🙂 thank you 🙂

nur hamdanah

12100034

tugas vb entri penjualan laptop apple

dana lptop

 

 

 

Private Sub cbokode_Click()

Txtjj.SetFocus

End Sub

 

 

 

Private Sub cmdkeluar_Click()

End

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 cmdproses_Click()

Dim penjualan, discount, kode, merk, bayar, n, d 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

n = Val(Txtjj.Text)

d = Val(Txths.Text)

penjualan = n * d

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 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

🙂 thank you 🙂

nur hamdanah

12100034.

tugas vb penjualan tiket kereta

TUGAS VB NUR HAMDANAH

DANA

a.Private Sub CMDKELUAR_Click()

End

End Sub

b.Private Sub CMDLAGI_Click()

TXTKT.Text = “”

TXTHT.Text = “”

TXTJK.Text = “”

TXTJB.Text = “”

TXTJT.Text = “”

TXTTOTALP.Text = “”

End Sub

c.Private Sub CMDPROSES_Click()

Dim KT, JK, HT, JB As String

KT = Left(TXTKT.Text, 7)

If KT = “BIM” Then

TXTJK.Text = “BIMA”

TXTHT.Text = “50000”

TXTJB.Text = “16.00”

ElseIf KT = “EKO” Then

TXTJK.Text = “EKONOMI”

TXTHT.Text = “35000”

TXTJB.Text = “19.00”

ElseIf KT = “MUT” Then

TXTJK.Text = “MUTIARA”

TXTHT.Text = “23000”

TXTJB.Text = “17.00”

ElseIf KT = “SEN” Then

TXTJK.Text = “SENJA”

TXTHT.Text = “15000”

TXTJB.Text = “20.00”

End If

JUMLAH = TXTJT.Text

TXTJT.SetFocus

TXTTOTALP.Text = Val(TXTHT.Text) * Val(TXTJT.Text)

TXTTOTALP.SetFocus

End Sub

🙂 THANK YOU 🙂

tugas 3.5

hm

Private Sub Cmd1_Click()
Dim NQ, NT, UTS, UAS, NA As Integer
Dim HM As String
NQ = Val(txt3.Text)
NT = Val(txt4.Text)
UTS = Val(Txt5.Text)
UAS = Val(Txt6.Text)
NA = (NQ + NT + UTS + UAS) / 4
If NA < 51 Then
HM = “E”
ElseIf NA < 61 Then
HM = “D”
ElseIf NA < 71 Then
HM = “C”
ElseIf NA < 81 Then
HM = “B”
Else
HM = “A”
End If
Txt7.Text = NA
txt8.Text = HM
End Sub

Private Sub cmd2_Click()
Combonpm.SetFocus
Combonpm.Text = “”
Txt1.Text = “”
Txt2.Text = “”
txt3.Text = “”
txt4.Text = “”
Txt5.Text = “”
Txt6.Text = “”
Txt7.Text = “”
txt8.Text = “”
End Sub

Private Sub cmd3_Click()
Unload Me
End Sub

Private Sub Combonpm_Click()
Dim npm, nm, jrusan As String
Select Case Combonpm.Text
Case “12100034”
nama = “Nur Hamdanah”
jurusan = “Sistem Informasi”
Case “12100036”
nama = “Ines Purnama Sari”
jurusan = “Sistem Informasi”
Case “12100038”
nama = “Agusta Hendriyarti”
jurusan = “Sistem Informasi”
End Select
Txt1.Text = nama
Txt2.Text = jurusan
txt3.SetFocus
End Sub

Private Sub Form_Load()
Combonpm.AddItem “12100034”
Combonpm.AddItem “12100036”
Combonpm.AddItem “12100038”
End Sub

Private Sub txt3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt4.SetFocus
End If
End Sub

Private Sub txt4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txt5.SetFocus
End If
End Sub

Private Sub Txt5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txt6.SetFocus
End If
End Sub

rumus 2

Private Sub cmd2_Click()

Combonpm.SetFocus

Combonpm.Text = “”

Txt1.Text = “”

Txt2.Text = “”

txt3.Text = “”

txt4.Text = “”

Txt5.Text = “”

Txt6.Text = “”

Txt7.Text = “”

txt8.Text = “”

End Sub

Private Sub cmd3_Click()

Unload Me

End Sub

Private Sub Combonpm_Click()

Dim nama, jurusan, HM As String

Select Case Combonpm.Text

Case “12100034”

nama = “Nur Hamdanah”

jurusan = “Sistem Informasi”

Case “12100036”

nama = “Ines purnama sari”

jurusan = “Sistem Informasi”

Case “12100036”

nama = “Agusta Hendriyarti”

jurusan = “Sistem Informasi”

End Select

Txt1.Text = nama

Txt2.Text = jurusan

txt3.SetFocus

End Sub

Private Sub Form_Load()

Combonpm.AddItem “12100034”

Combonpm.AddItem “12100036”

Combonpm.AddItem “12100038”

End Sub

🙂 thank you 🙂