Membuat Form Anggota Aplikasi Perpus Vb 6.0

Berikut ini yaitu STEP 9 dalam Step by Step menciptakan aplikasi perpustakaan dengan visual basic 6.0 database SQL Server. Pada step 9 ini akan dibahas cara menciptakan Form Anggota Aplikasi Perpus.

STEP Sebelumnya :
STEP 01 : Membuat Project Aplikasi Perpus
STEP 02 : Membuat Form Menu Utama
STEP 03 : Membuat Database dan Tabel Perpus
STEP 04 : Membuat Koneksi Database DBPerpus
STEP 05 : Membuat Form Login Aplikasi Perpus
STEP 06 : Membuat Koding Logout
STEP 07 : Membuat Form Petugas Aplikasi Perpus
STEP 08 : Membuat Tabel Anggota dan Buku Aplikasi Perpus

Berikut langkahnya :
Buka Project anda sebelumnya
Jika anda lihat gambar diatas, anda telah sukses menciptakan Form Petugas Aplikasi Perpus
Klik Project - Add Form
Jika sudah muncul form1, silahkan ganti nama form1 menjadi FormMasterAnggota
Kemudian masukan koding dibawah ini :
Dim mvBookMark As Variant
Private Sub Command1_Click()
If Text1 = "" Or Text2 = "" Or Text3 = "" Or Text4 = "" Then
MsgBox "Data Belum Lengkap"
Else
Call BukaDB
Dim SQLTambah As String
            SQLTambah = "Insert Into TBL_ANGGOTA values ('" & Text1 & "','" & Text2 & "','" & Text3 & "','" & Text4 & "')"
            Koneksi.Execute SQLTambah
            MsgBox "Data Berhasil Ditambah", vbInformation, "Pemberitahuan"
            Form_Activate
            Call kondisiawal
End If
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Sub Form_Load()
Text1.MaxLength = 6
Text2.MaxLength = 50
Text3.MaxLength = 30
Text4.MaxLength = 20
kondisiawal
End Sub
Private Sub kondisiawal()
    Command1.Caption = "&Input"
    Command2.Caption = "&Edit"
    Command3.Caption = "&Hapus"
    Command4.Caption = "&Tutup"
    Command1.Enabled = True
    Command2.Enabled = True
    Command3.Enabled = True
    Text1 = ""
    Text2 = ""
    Text3 = ""
    Text4 = ""
End Sub
Private Sub Form_Activate()
Call BukaDB
Adodc1.ConnectionString = Koneksi
Adodc1.RecordSource = "select * from TBL_ANGGOTA"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
Call kondisiawal
Command1.SetFocus
End Sub
FormMenuUtama
Private Sub MnAnggota_Click()
FormMasterAnggota.Show vbModal
End Sub

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel