LAMPIRAN LISTING PROGRAM
1. Main Form frmMain.frm
Private Sub MDIForm_UnloadCancel As Integer oConn.Close
Set oConn = Nothing End Sub
Private Sub mnAbout_Click frmAbout.Show vbModal
End Sub Private Sub mnExit_Click
End End Sub
Private Sub mnLBeliBrg_Click frmLapBeliB1.Show
End Sub Private Sub mnLBeliSupp_Click
frmLapBeliS1.Show End Sub
Private Sub mnLBeliTgl_Click frmLapBeli1.Show
End Sub Private Sub mnLJualBrg_Click
frmLapJualB1.Show End Sub
Private Sub mnLJualCust_Click frmLapJualC1.Show
End Sub Private Sub mnLJualTgl_Click
frmLapJual1.Show End Sub
Private Sub mnLSaldoStock_Click frmLapSaldoStock1.Show
End Sub Private Sub mnMBarang_Click
frmBarang.Show End Sub
Private Sub mnMCustomer_Click frmCustomer.Show
End Sub
Universitas Sumatera Utara
Private Sub mnMSupplier_Click frmSupplier.Show
End Sub Private Sub mnTPembelian_Click
frmBeli.Show End Sub
Private Sub mnTPenjualan_Click frmJual.Show
End Sub
2. Form Master Barang frmBarang.frm
Option Explicit Private nLastRow As Integer
Private Sub cmdCari_Click If TrimtxtKunci.Text = Then Exit Sub
Dim I As Long Dim J As Integer
Dim nSearchCol As Integer Ambil kolom yang dicari
nSearchCol = cboKategori.ListIndex + 1 With MData
If nLastRow 0 Then Background Putih
For I = 1 To .Cols - 1 .Col = I
.Row = nLastRow .CellBackColor = HFFFFFF
Next I End If
Cari Text For I = nLastRow + 1 To .Rows - 1
If InStr1, UCase.TextMatrixI, nSearchCol, _ UCasetxtKunci.Text 0 Then
nLastRow = I Warnai dengan background kuning
.Row = I For J = 1 To .Cols - 1
.Col = J .CellBackColor = H87F2F0
Next J Exit For
End If Next I
If I = .Rows Then
Universitas Sumatera Utara
Reset kembali - pencarian dari awal nLastRow = 0
End If Set Focus
If .TopRow + 10 nLastRow Then .TopRow = nLastRow End With
End Sub Private Sub cmdCloseHelp_Click
picHelp.Visible = False End Sub
Private Sub cmdHelp_Click picHelp.Visible = True
picHelp.ZOrder 0 cmdCloseHelp.SetFocus
End Sub Private Sub Form_KeyDownKeyCode As Integer, Shift As
Integer If KeyCode = vbKeyReturn Then
Untuk Enter SendKeys {TAB}
Else Select Case KeyCode
Case vbKeyF1: Call ProsesHELP Case vbKeyF2: Call ProsesBARU
Case vbKeyF3: Call ProsesSIMPAN Case vbKeyF4: Call ProsesHAPUS
Case vbKeyF5: Call ProsesREFRESH Case vbKeyF6: Call ProsesFIRST
Case vbKeyF7: Call ProsesPREVIOUS Case vbKeyF8: Call ProsesNEXT
Case vbKeyF9: Call ProsesLAST Case vbKeyF10: Call ProsesKELUAR
Case vbKeyF12: Call ProsesPRINT End Select
End If End Sub
errDel: oConn.RollbackTrans
MsgBox Proses hapus data gagal vbCrLf Err.Description, vbCritical, Error
End Sub
3. Form Master Supplier frmSupplier.frm