164
4.5 Tampilan dan Kode Program
Tampilan dan Kode Program yang ada disini menggambarkan dari tampilan program yang dibuat penulis, berikut juga terdapat listing program dari setiap
tampilan, berikut diawah ini tampilan programnya:
4.5.1 Tampilan Login
Gambar 4.67 Tampilan Login
Tabel 4.59 Listing Program Login
Listing Program Keterangan
On Error Resume Next Dim wav As String
If Combo1 = nul Or txt1 = nul Or txt2 = nul Then MsgBox Lengakapi data terlebih dahulu,
vbCritical, Error Else
Adodc1.Refresh Adodc1.Recordset.MoveFirst
Adodc1.Recordset.Find Password= Combo1 Login untuk Bagian Penjualan
If Combo1 = Supervisor Sales Then If txt2 = Adodc1.Recordset.Fields0 Then
With Adodc2.Recordset .Fields0 = txt1.Text
.Fields1 = Combo1.Text .Update
End With MsgBox Sukses, Password anda valid,
vbInformation, Informasi wav = App.Path \Includes\Thank You.wav
Call PlaySoundwav FrmLoading.Text1.Text = txt1
FrmLoading.Text2.Text = Combo1 Set FrmLogin = Nothing
Unload Me FrmLoading.Show
Perintah Masuk
Menu Utama
165
Tabel 4.60 Listing Program Login Lanjutan 1
Listing Program Keterangan
Login untuk Bagian Finance If Combo1 = Supervisor Finance Then
If txt2 = Adodc1.Recordset.Fields2 Then MsgBox Sukses, Password anda valid,
vbInformation, Informasi wav = App.Path \Includes\Thank You.wav
Call PlaySoundwav FrmLoading.Text1.Text = txt1
FrmLoading.Text2.Text = Combo1 Set FrmLogin = Nothing
Unload Me FrmLoading.Show
Else wav = App.Path \Includes\wrong.wav
Call PlaySoundwav MsgBox Password Tidak valid, Coba lagi,
vbCritical, Error Me.txt2 =
Me.txt2.SetFocus End If
End If Login untuk Bagian Warehouse
If Combo1 = Warehouse Then If txt2 = Adodc1.Recordset.Fields3 Then
MsgBox Sukses, Password anda valid, vbInformation, Informasi
wav = App.Path \Includes\Thank You.wav Call PlaySoundwav
FrmLoading.Text1.Text = txt1 FrmLoading.Text2.Text = Combo1
Set FrmLogin = Nothing Unload Me
FrmLoading.Show Else
wav = App.Path \Includes\wrong.wav Call PlaySoundwav
MsgBox Password Tidak valid, Coba lagi, vbCritical, Error
Me.txt2 = Me.txt2.SetFocus
End If End If
Login untuk Bagian Delivery If Combo1 = Delivery Then
If txt2 = Adodc1.Recordset.Fields4 Then MsgBox Sukses, Password anda valid,
vbInformation, Informasi wav = App.Path \Includes\Thank You.wav
Call PlaySoundwav FrmLoading.Text1.Text = txt1
FrmLoading.Text2.Text = Combo1 Set FrmLogin = Nothing
End Sub Perintah
Masuk Menu
Utama
166
4.5.2 Tampilan Menu Utama