Private Sub cmdbaru_click()
Call hapus
Adodc1.Recordset.AddNew
kode.SetFocus
End Sub
Sub hapus()
kode.Text = ""
nm.Text = ""
almt.Text = ""
telp.Text = ""
End Sub
Private Sub Cmdkeluar_Click()
Unload Me
End Sub
Private Sub Cmdsimpan_Click()
Adodc1.Recordset!kode = kode.Text
Adodc1.Recordset!nama = nm.Text
Adodc1.Recordset!Alamat = almt.Text
Adodc1.Recordset!Telpon = telp.Text
Adodc1.Recordset.Update
Call Command4_Click
End Sub
Private Sub Command1_Click()
Adodc1.Recordset.MoveFirst
showdb
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.MoveNext
showdb
End Sub
Sub showdb()
kode.Text = Adodc1.Recordset!kode
nm.Text = Adodc1.Recordset!nama
almt.Text = Adodc1.Recordset!Alamat
telp.Text = Adodc1.Recordset!Telpon
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.MovePrevious
showdb
End Sub
Private Sub Cmdhapus_Click()
Adodc1.Recordset.Delete
Call Command4_Click
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.MoveLast
showdb
End Sub
Private Sub Form_Load()
End Sub
Private Sub cmdbaru_click()
Call hapus
Adodc1.Recordset.AddNew
kode.SetFocus
End Sub
Sub hapus()
kode.Text = ""
nm.Text = ""
sat.Text = ""
hrg.Text = ""
jum.Text = ""
End Sub
Private Sub Cmdkeluar_Click()
Unload Me
End Sub
Private Sub Cmdsimpan_Click()
Adodc1.Recordset!kode = kode.Text
Adodc1.Recordset!nama = nm.Text
Adodc1.Recordset!satuan = sat.Text
Adodc1.Recordset!Harga = hrg.Text
Adodc1.Recordset!Jumlah = jum.Text
Adodc1.Recordset.Update
Call Command8_Click
End Sub
Private Sub Command7_Click()
Adodc1.Recordset.MoveFirst
showdb
End Sub
Private Sub Command6_Click()
Adodc1.Recordset.MoveNext
showdb
End Sub
Sub showdb()
kode.Text = Adodc1.Recordset!kode
nm.Text = Adodc1.Recordset!nama
sat.Text = Adodc1.Recordset!satuan
hrg.Text = Adodc1.Recordset!Harga
jum.Text = Adodc1.Recordset!Jumlah
End Sub
Private Sub Command5_Click()
Adodc1.Recordset.MovePrevious
showdb
End Sub
Private Sub Cmdhapus_Click()
Adodc1.Recordset.Delete
Call Command8_Click
End Sub
Private Sub Command8_Click()
Adodc1.Recordset.MoveLast
showdb
End Sub
Private Sub Form_Load()
sat.AddItem "Pack"
sat.AddItem "Bungkus"
sat.AddItem "Lusin"
End Sub
Private Sub cmdbaru_click()
Call hapus
Adodc1.Recordset.AddNew
kode.SetFocus
End Sub
Sub hapus()
kode.Text = ""
nama.Text = ""
hub.Text = ""
almt.Text = ""
telp.Text = ""
End Sub
Private Sub Cmdkeluar_Click()
Unload Me
End Sub
Private Sub Cmdsimpan_Click()
Adodc1.Recordset!kode = kode.Text
Adodc1.Recordset!Nama_PT = nama.Text
Adodc1.Recordset!Penghubung = hub.Text
Adodc1.Recordset!Alamat = almt.Text
Adodc1.Recordset!Telpon = telp.Text
Adodc1.Recordset.Update
Call Command4_Click
End Sub
Private Sub Command1_Click()
Adodc1.Recordset.MoveFirst
showdb
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.MoveNext
showdb
End Sub
Sub showdb()
kode.Text = Adodc1.Recordset!kode
nama.Text = Adodc1.Recordset!Nama_PT
hub.Text = Adodc1.Recordset!Penghubung
almt.Text = Adodc1.Recordset!Alamat
telp.Text = Adodc1.Recordset!Telpon
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.MovePrevious
showdb
End Sub
Private Sub Cmdhapus_Click()
Adodc1.Recordset.Delete
Call Command4_Click
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.MoveLast
showdb
End Sub
Private Sub Form_Load()
End Sub
Private Sub MDIForm_Load()
End Sub
Private Sub Tools_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case "1"
frmBarang.Show
Case "2"
Formpelanggan.Show
Case "3"
FrmPemasok.Show
Case "4"
Call f3_Click
Case "5"
End
End Select
End Sub
Private Sub f3_Click()
End
End Sub
Private Sub mnf1_Click()
frmBarang.Show
End Sub
Private Sub mnf2_Click()
Formpelanggan.Show
End Sub
Private Sub mnf3_Click()
FrmPemasok.Show
End Sub
Tidak ada komentar:
Posting Komentar