From login
Private Sub cmdMasuk_Click()
If text1.Text = "jihat" And text2.Text = "1" Then
Load Form1
Form4.Show
Unload Me
Else
MsgBox "IDENTITAS ANDA SALAH"
text1.Text = ""
text2.Text = ""
Refresh
End If
End Sub
Private Sub Timer1_Timer()
Label1.Left = Label1.Left - 15
If Label1.Left <= -Label1.Left Then Label1.Left = Form1.Width End If End Sub 1. Menu utama List Private Sub Command1_Click() Load Form2 Form2.Show Unload Me End Sub Private Sub Command2_Click() Load Form3 Form3.Show Unload Me End Sub Private Sub Command3_Click() Load Form5 Form5.Show Unload Me End Sub Private Sub Command4_Click() End End Sub 2. Input Data List: Private Sub Command1_Click() Dim x As Integer On Error GoTo salah With Adodc1.Recordset .AddNew !nama_pelanggan = Text1.Text !nama_perusahaan = Text2.Text !alamat_pemasangan = Text3.Text !no_speedy = Text4.Text !no_telpon = Text5.Text !tanggal_pemasangan = Text6.Text !paket = Combo1.Text .Update On Error GoTo 0 End With Exit Sub salah: x = MsgBox("ada kesalahan saat menyimpan data!" + Chr(13) + _ "penyimpanan di batalkan...", vbOKOnly) End Sub Private Sub Command2_Click() Load Form4 Form4.Show Unload Me End Sub Private Sub Form_Activate() Combo1.AddItem "Speedy Pro" Combo1.AddItem "Speedy Smart" Combo1.AddItem "Speedy Ruko" End Sub 3. Form Pencarian data List: Private Sub Command1_Click() Adodc1.Recordset.Delete Adodc1.Recordset.MoveNext End Sub Private Sub Command2_Click() Load Form4 Form4.Show Unload Me End Sub Private Sub Form_Activate() Adodc1.ConnectionString = _ "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data source=datapelanggan.mdb;" & _ "persist security info= false" Adodc1.CommandType = adCmdText End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) Dim x As Integer If Not KeyAscii = 13 Then 'adalah nomor enter Exit Sub End If With Adodc1 .RecordSource = "select*from dbpelanggan where no_speedy like '%" & _ Text1.Text & "%'" .Refresh End With End Sub 4. Form Cetak List : Private Sub Command1_Click() On Error Resume Next DataReport1.Show DataReport1.WindowState = 2 DataReport1.Refresh DataEnvironment1.Recordsets(1).Close Unload Me End Sub Private Sub Command2_Click() Load Form4 Form4.Show Unload Me End Sub 5. Form Cetak List : Private Sub Command1_Click() On Error Resume Next DataReport1.Show DataReport1.WindowState = 2 DataReport1.Refresh DataEnvironment1.Recordsets(1).Close Unload Me End Sub
download and read me