2. Form Login
Private Sub cmdOK_Click()
If Text1.Text = Text2.Text Then
Call Form8.Show
Form1.Hide
Else
MsgBox "Password Salah!!!, Isi Password = nama user", vbInformation, "Ulangi"
End If
End Sub
Form Splash
muslih hidayat 1101169
3. Private Sub about_Click()
Call Form6.Show
End Sub
Private Sub Command1_Click()
Call Form3.Show
End Sub
Private Sub Command2_Click()
Call Form2.Show
End Sub
Private Sub Command3_Click()
Call Form5.Show
End Sub
Private Sub Command4_Click()
MsgBox "Terimakaih", vbYesNo, "Keluar"
End
End Sub
Private Sub Command5_Click()
Call Form6.Show
End Sub
Private Sub Command6_Click()
Call Form7.Show
End Sub
Private Sub Form_Load()
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
End Sub
Private Sub harga_Click()
Call Form2.Show
End Sub
Private Sub keluar_Click()
End
End Sub
Private Sub pelanggan_Click()
Call Form7.Show
End Sub
Private Sub Rute_Click()
Call Form5.Show
End Sub
Private Sub Transaksi_Click(Index As Integer)
Call Form3.Show
End Sub
muslih hidayat 1101169
4. Form Pelanggan
Private Sub Command1_Click()
Data1.Recordset.MoveFirst
End Sub
Private Sub Command2_Click()
Data1.Recordset.MoveNext
End Sub
Private Sub Command3_Click()
Delete = MsgBox("Anda Yakin Ingin menghapusnya", vbInformation + vbYesNo, "hapus")
If Delete = vbYes Then
Data1.Recordset.Delete
Data1.Recordset.MoveNext
Else
Data1.Recordset.MoveFirst
End If
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Command5_Click()
Data1.Recordset.FindFirst "nama='" + Text6 + "'"
If Data1.Recordset.NoMatch Then
MsgBox "Nama yang Anda cari Tidak Ditemukan", vbOKOnly, "cari"
Data1.Recordset.MoveFirst
End If
End Sub
Private Sub Form_Load()
DTPicker1.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
End Sub
muslih hidayat 1101169
5. Form Transaksi
Private Sub Command1_Click()
Text4.Text = Val(Text3.Text) - Val(Text1.Text)
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub taktampil()
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Option1.Enabled = False
Option2.Enabled = False
Option3.Enabled = False
Option4.Enabled = False
Option5.Enabled = False
Command1.Enabled = False
Command3.Enabled = False
DTPicker1.Enabled = False
End Sub
Private Sub tampil()
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Option1.Enabled = True
Option2.Enabled = True
Option3.Enabled = True
Option4.Enabled = True
Option5.Enabled = True
Command1.Enabled = True
Command3.Enabled = True
DTPicker1.Enabled = True
End Sub
muslih hidayat 1101169
6. Private Sub Command3_Click()
Data1.Recordset.Update
Data1.Recordset.MoveNext
Call taktampil
MsgBox "Data sudah tersimpan,Silahkan lihat di Menu DATA", vbOKOnly, "Sukses"
End Sub
Private Sub Command4_Click()
Data1.Recordset.AddNew
Call tampil
Text5.SetFocus
Command4.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
End Sub
Private Sub Form_Load()
Call taktampil
DTPicker1.Enabled = False
End Sub
Private Sub Option1_Click()
Text1.Text = "30000"
Text2.Text = "Tanjab Timur"
End Sub
Private Sub Option2_Click()
Text1.Text = "35000"
Text2.Text = "Bulian"
End Sub
Private Sub Option3_Click()
Text1.Text = "70000"
Text2.Text = "Sarolangun"
End Sub
Private Sub Option4_Click()
Text1.Text = "90000"
Text2.Text = "Bangko"
End Sub
Private Sub Option5_Click()
Text1.Text = "200000"
Text2.Text = "Linggau"
End Sub
muslih hidayat 1101169
7. Form Rute
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
End Sub
Form Harga
Private Sub Command1_Click()
If Combo1 = "Sarolangun" Then
Text1.Text = "Rp.80.000"
End If
If Combo1 = "Tanjab Timur" Then
Text1.Text = "Rp.30.000"
End If
muslih hidayat 1101169
8. If Combo1 = "Bulian" Then
Text1.Text = "Rp.25.000"
End If
If Combo1 = "Bungo" Then
Text1.Text = "Rp.100.000"
End If
If Combo1 = "Bangko" Then
Text1.Text = "Rp.80.000"
End If
If Combo1 = "Linggau" Then
Text1.Text = "Rp.200.000"
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Combo1.Clear
Combo1.AddItem "Tanjab Timur"
Combo1.AddItem "Bulian"
Combo1.AddItem "Bungo"
Combo1.AddItem "Bangko"
Combo1.AddItem "Linggau"
Text1.Enabled = False
End Sub
Form About
muslih hidayat 1101169
9. Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim Hari(7) As String
Dim bulan(12) As String
Hari(1) = "Minggu"
Hari(2) = "Senin"
Hari(3) = "Selasa"
Hari(4) = "Rabu"
Hari(5) = "Kamis"
Hari(6) = "Jum'at"
Hari(7) = "Sabtu"
bulan(1) = "Januari"
bulan(2) = "Februari"
bulan(3) = "Maret"
bulan(4) = "April"
bulan(5) = "Mei"
bulan(6) = "Juni"
bulan(7) = "Juli"
bulan(8) = "Agustus"
bulan(9) = "September"
bulan(10) = "Oktober"
bulan(11) = "November"
bulan(12) = "Desember"
har = Weekday(Date)
tgl = Day(Date)
bul = Month(Date)
thn = Str(Year(Date))
Label7.Caption = Hari(har)
Label8.Caption = Str(tgl) & " - " & bulan(bul) & " - " & thn
End Sub
muslih hidayat 1101169