kode peminjaman buku




kode buku
Private Sub cmbkode_Click()
If cmbkode.Text = "123" Then
txtjudul.Text = "agama"
txtpenulis.Text = "nia nurhayati"
txtrak.Text = "1"
ElseIf cmbkode.Text = "1234" Then
txtjudul.Text = "bintang"
txtpenulis.Text = "wayan"
txtrak.Text = "2"
ElseIf cmbkode.Text = "12345" Then
txtjudul.Text = "bulan"
txtpenulis.Text = "kiki"
txtrak.Text = "3"
ElseIf cmbkode.Text = "123456" Then
txtjudul.Text = "aku"
txtpenulis.Text = "hilda"
txtrak.Text = "4"
ElseIf cmbkode.Text = "1234567" Then
txtjudul.Text = "mama"
txtpenulis.Text = "tika"
txtrak.Text = "5"
End If
txtterlambat.SetFocus
End Sub

kode keluar
Private Sub cmdkeluar_Click()
Unload Me
End Sub

 kode hitung lagi
Private Sub cmdlagi_Click()
txtnama.Text = " "
cmbkode.Text = " "
txtjudul.Text = " "
txtpenulis.Text = " "
txtrak.Text = " "
txtterlambat.Text = " "
txtdenda.Text = " "
End Sub

kode menampilkan kode buku
Private Sub Form_Load()
cmbkode.AddItem "123"
cmbkode.AddItem "1234"
cmbkode.AddItem "12345"
cmbkode.AddItem "123456"
cmbkode.AddItem "1234567"
End Sub



kode hitung
Private Sub txtterlambat_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtdenda.Text = Val(2000) * Val(txtterlambat.Text)
End If
End Sub

Komentar