Form Transaksi Pembelian frmBeli.frm Form Transaksi Penjualan frmJual.frm

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 txtNoHP_KeyPressKeyAscii As Integer If KeyAscii vbKeyBack And KeyAscii Asc0 Or KeyAscii Asc9 _ And InStr1, -,, ChrKeyAscii = 0 Then KeyAscii = 0 End If End Sub

5. Form Transaksi Pembelian frmBeli.frm

Option Explicit Private nRowI As Integer Private nColI As Integer 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 Select Case cboKategori.Text Case No Faktur: nSearchCol = 1 Case Kode Supplier: nSearchCol = 3 Case Nama Supplier: nSearchCol = 4 Case Keterangan: nSearchCol = 6 End Select With MData If nLastRow 0 Then Background Putih For I = 1 To .Cols - 1 .Col = I .Row = nLastRow .CellBackColor = HFFFFFF Next I End If Universitas Sumatera Utara 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 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 Function CekSamapcKodeStock As Boolean Dim I As Integer For I = 1 To MStock.Rows - 1 If UCasepcKodeStock = MStock.TextMatrixI, 0 Then CekSama = True Exit Function End If Next I End Function

6. Form Transaksi Penjualan frmJual.frm

Option Explicit Private nRowI As Integer Universitas Sumatera Utara Private nColI As Integer 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 Select Case cboKategori.Text Case No Faktur: nSearchCol = 1 Case Kode Customer: nSearchCol = 3 Case Nama Customer: nSearchCol = 4 Case Keterangan: nSearchCol = 8 End Select 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 Reset kembali - pencarian dari awal nLastRow = 0 End If Set Focus If .TopRow + 10 nLastRow Then .TopRow = nLastRow End With End Sub Universitas Sumatera Utara Private Sub txtNoFaktur_ValidateCancel As Boolean If TrimtxtNoFaktur.Text = Then Cancel = True txtNoFaktur.Text = End If End Sub Private Function CekSamapcKodeStock As Boolean Dim I As Integer For I = 1 To MStock.Rows - 1 If UCasepcKodeStock = MStock.TextMatrixI, 0 Then CekSama = True Exit Function End If Next I End Function

7. Form Cetak Faktur Jual frmCetakFakturJual.frm