• Tidak ada hasil yang ditemukan

LAMPIRAN 1 FORMULIR MASUKAN DAN KELUARAN

N/A
N/A
Protected

Academic year: 2021

Membagikan "LAMPIRAN 1 FORMULIR MASUKAN DAN KELUARAN"

Copied!
36
0
0

Teks penuh

(1)

LAMPIRAN 1

FORMULIR MASUKAN DAN KELUARAN

(2)
(3)
(4)

LAMPIRAN 2 LISTING PROGRAM

(5)

#####MENU UTAMA#####

Private Sub ESB_Click()

FrmSpeksifikasi.Show vbModal End Sub

Private Sub MNBP_Click()

FrmEntryPembayaran.Show vbModal End Sub

Private Sub MNCBP_Click()

FrmCetakBP.Show vbModal End Sub

Private Sub MNCLP_Click()

FrmLaporanPemesanan.Show vbModal End Sub

Private Sub MNCSO_Click()

FrmCetakSlipOrder.Show vbModal End Sub

Private Sub MNEB_Click()

FrmBarang.Show vbModal End Sub

Private Sub MNEP_Click()

FrmPemesan.Show vbModal End Sub

Private Sub MNESO_Click()

FrmEntrySlipOrder.Show vbModal End Sub

Private Sub MNKELUAR_Click() Unload Me

End Sub

(6)

#####FORM PEMESAN#####

Dim RSPEMESAN As New ADODB.Recordset Private Sub CmdCancel_Click()

Call KOSONG

CmdSave.Enabled = True CmdEdit.Enabled = False CmdDelete.Enabled = False End Sub

Private Sub CmdDelete_Click()

A = MsgBox("APAKAH DATA DENGAN KODE : " & Text1 & " INGIN DIHAPUS ", vbOKCancel,

"PERINGATAN") If A = vbOK Then

CN.Execute " DELETE * FROM PEMESAN WHERE Kdpmsn ='" & Text1 & "'"

tampil KOSONG

CmdSave.Enabled = True End If

End Sub

Private Sub CmdEdit_Click() Dim sql As String

sql = " select * FROM PEMESAN where KdPmsn=('" & Text1.Text & "')"

Set RSPEMESAN = CN.Execute(sql) If RSPEMESAN.EOF Then

MsgBox "KODE PEMESAN : " & Text1 & " TIDAK ADA ", vbInformation, "PESAN"

Else

CN.Execute "UPDATE PEMESAN SET NmPmsn='" & Text2 & "',Almtpmsn='" & Text3 &

"',Telppmsn='" & Text4 & "',Contactperson='" & Text5 & "' WHERE KdPmsn='" & Text1 & "'"

MsgBox "DATA PEMESAN DENGAN KODE : " & Text1 & " SUDAH DIUBAH !"

tampil KOSONG

CmdSave.Enabled = True End If

End Sub

Private Sub CmdExit_Click() Unload Me

End Sub

Private Sub CmdSave_Click() Dim sql As String

sql = " select * FROM PEMESAN where KdPmsn=('" & Text1.Text & "')"

Set RSPEMESAN = CN.Execute(sql)

(7)

sql = MsgBox("APAKAH DATA AKAN DISIMPAN", vbYesNo + vbQuestion, "PERHATIAN!!") If sql = vbYes Then

If Not RSPEMESAN.EOF Then

MsgBox "KODE PEMESAN : " & Text1 & " SUDAH PERNAH DISIMPAN ", vbInformation,

"PESAN"

ElseIf Text1.Text = "" Then

MsgBox "KODE PEMESAN HARUS DIISI", vbOKOnly + vbInformation, "PERINGATAN!!"

Text1.SetFocus

ElseIf Text2.Text = "" Then

MsgBox "NAMA PEMESAN HARUS DIISI", vbOKOnly + vbInformation, "PERINGATAN!!"

Text2.SetFocus

ElseIf Text3.Text = "" Then

MsgBox "ALAMAT PEMESAN HARUS DIISI", vbOKOnly + vbInformation,

"PERINGATAN!!"

Text3.SetFocus

ElseIf Text4.Text = "" Then

MsgBox "TELPON PEMESAN HARUS DIISI", vbOKOnly + vbInformation,

"PERINGATAN!!"

Text4.SetFocus ElseIf Text5.Text = "" Then

MsgBox "NAMA CONTACT PERSON HARUS DIISI", vbOKOnly + vbInformation,

"PERINGATAN!!"

Text4.SetFocus Else

CN.Execute "INSERT INTO PEMESAN VALUES('" & Text1.Text & "','" & Text2.Text & "','" &

Text3.Text & "','" & Text4.Text & "','" & Text5.Text & "')"

tampil KOSONG End If End If End Sub

Private Sub DGPEMESAN_Click()

CN.Execute " SELECT * FROM PEMESAN WHERE kdpmsn ='" & Text1 & "'"

Text1 = DGPEMESAN.Columns![0]

Text2 = DGPEMESAN.Columns![1]

Text3 = DGPEMESAN.Columns![2]

Text4 = DGPEMESAN.Columns![3]

Text5 = DGPEMESAN.Columns![4]

CmdSave.Enabled = False CmdEdit.Enabled = True CmdDelete.Enabled = True Text1.Enabled = False End Sub

Private Sub Form_Activate() Text1.SetFocus

End Sub

(8)

Private Sub Form_Load() BUKADATABASE

Set RSPEMESAN = New ADODB.Recordset

RSPEMESAN.Open "SELECT * FROM PEMESAN", CN, adOpenDynamic, adLockOptimistic tampil

End Sub

Sub DATAGRID()

DGPEMESAN.AllowRowSizing = False

DGPEMESAN.Columns(0).Caption = "KODE PEMESAN"

DGPEMESAN.Columns(0).Width = 2000 DGPEMESAN.Columns(0).AllowSizing = False

DGPEMESAN.Columns(1).Caption = "NAMA PEMESAN"

DGPEMESAN.Columns(1).Width = 3000 DGPEMESAN.Columns(1).AllowSizing = False

DGPEMESAN.Columns(2).Caption = "ALAMAT PEMESAN"

DGPEMESAN.Columns(2).Width = 3000 DGPEMESAN.Columns(2).AllowSizing = False

DGPEMESAN.Columns(3).Caption = "TELP PEMESAN"

DGPEMESAN.Columns(3).Width = 1500 DGPEMESAN.Columns(3).AllowSizing = False

DGPEMESAN.Columns(4).Caption = "CONTACT PERSON"

DGPEMESAN.Columns(4).Width = 1500 DGPEMESAN.Columns(4).AllowSizing = False End Sub

Sub tampil()

Set RSPEMESAN = New ADODB.Recordset

RSPEMESAN.Open "SELECT*FROM PEMESAN", CN RSPEMESAN.Sort = "Kdpmsn ASC"

Set DGPEMESAN.DataSource = RSPEMESAN DATAGRID

End Sub Sub KOSONG()

Text1.Enabled = True Text1 = ""

Text1.SetFocus Text2 = ""

Text3 = ""

Text4 = ""

(9)

Text5 = ""

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii)))

If KeyAscii = 13 Then

If Len(Text1.Text) <> 5 Then

MsgBox "KODE HARUS 5 KARAKTER", vbCritical, "INGAT !!"

Text1.SetFocus Else

Text2.SetFocus End If

End If End Sub

Private Sub Text1_LostFocus() Dim sql As String

sql = "select*from pemesan " & " where kdpmsn =('" & Text1.Text & "')"

Set RSPEMESAN = CN.Execute(sql) If Not RSPEMESAN.EOF Then

Text1.Text = RSPEMESAN("KdPmsn") Text2.Text = RSPEMESAN("NmPmsn") Text3.Text = RSPEMESAN("Almtpmsn") Text4.Text = RSPEMESAN("Telppmsn") Text5.Text = RSPEMESAN("Contactperson") End If

End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii)))

If KeyAscii = 13 Then Text3.SetFocus End If

End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii)))

If KeyAscii = 13 Then Text4.SetFocus End If

End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then

Text5.SetFocus End If

End Sub

(10)

Private Sub Text5_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then

CmdSave.Enabled = True CmdSave.SetFocus End If

End Sub

#####FORM BARANG#####

Dim rsbarang As New ADODB.Recordset Private Sub Dgbarang_Click()

CN.Execute " SELECT * FROM BARANG WHERE KdBrg ='" & Text1 & "'"

Text1 = DGBARANG.Columns![0]

Text2 = DGBARANG.Columns![1]

Text3 = DGBARANG.Columns![2]

CmdSave.Enabled = False CmdEdit.Enabled = True CmdDelete.Enabled = True Text1.Enabled = False End Sub

Private Sub CmdCancel_Click() Call KOSONG

CmdSave.Enabled = False CmdEdit.Enabled = True CmdDelete.Enabled = True End Sub

Private Sub CmdDelete_Click()

PESAN = MsgBox("APA DATA DENGAN KODE : " & Text1 & " INGIN DIHAPUS ", vbOKCancel + vbQuestion, "PERINGATAN")

If PESAN = vbOK Then

CN.Execute " DELETE * FROM BARANG WHERE KdBrg ='" & Text1 & "'"

tampil KOSONG

CmdSave.Enabled = True End If

End Sub

Private Sub CmdEdit_Click() Dim sql As String

sql = " select * FROM BARANG where KdBrg=('" & Text1.Text & "')"

Set rsbarang = CN.Execute(sql) If rsbarang.EOF Then

MsgBox "KODE BARANG:" & Text1 & " TIDAK ADA ", vbInformation, "PESAN"

(11)

Else

CN.Execute "UPDATE BARANG SET NmBrg='" & Text2 & "',Satuan='" & Text3 & "' WHERE KdBrg='" & Text1 & "'"

MsgBox "DATA BARANG DENGAN KODE : " & Text1 & " SUDAH DIUBAH !"

tampil KOSONG

CmdSave.Enabled = True End If

End Sub

Private Sub CmdExit_Click() Unload Me

End Sub

Private Sub CmdSave_Click() Dim sql As String

sql = " select * FROM BARANG where KdBrg=('" & Text1.Text & "')"

Set rsbarang = CN.Execute(sql)

sql = MsgBox("APAKAH DATA AKAN DISIMPAN", vbYesNo + vbQuestion, "PERHATIAN") If sql = vbYes Then

If Not rsbarang.EOF Then

MsgBox "KODE BARANG : " & Text1 & " SUDAH PERNAH DISIMPAN ", vbInformation,

"PERINGATAN.."

ElseIf Text1.Text = "" Then

MsgBox "KODE BARANG HARUS DIISI", vbOKOnly + vbInformation, "PERINGATAN!!"

Text1.SetFocus

ElseIf Text2.Text = "" Then

MsgBox "NAMA BARANG HARUS DIISI", vbOKOnly + vbInformation, "PERINGATAN!!"

Text2.SetFocus

ElseIf Text3.Text = "" Then

MsgBox "SATUAN HARUS DIISI", vbOKOnly + vbInformation, "PERINGATAN!!"

Text3.SetFocus Else

CN.Execute "INSERT INTO BARANG VALUES('" & Text1.Text & "','" & Text2.Text & "','"

& Text3.Text & "')"

Call tampil Call KOSONG End If

End If End Sub

Private Sub Form_Activate() Text1.SetFocus End Sub

Private Sub Form_Load() BUKADATABASE

Set rsbarang = New ADODB.Recordset

rsbarang.Open " SELECT * FROM BARANG ", CN, adOpenDynamic, adLockOptimistic

(12)

tampil End Sub Sub tampil()

Set rsbarang = New ADODB.Recordset

rsbarang.Open " SELECT * FROM BARANG ", CN rsbarang.Sort = "KdBrg ASC"

Set DGBARANG.DataSource = rsbarang DATAGRID

End Sub Sub KOSONG() Text1.Enabled = True Text1 = ""

Text1.SetFocus Text2 = ""

Text3 = ""

End Sub

Sub DATAGRID()

DGBARANG.AllowRowSizing = False

DGBARANG.Columns(0).Caption = "KODE BARANG"

DGBARANG.Columns(0).Width = 1500 DGBARANG.Columns(0).AllowSizing = False

DGBARANG.Columns(1).Caption = "NAMA BARANG"

DGBARANG.Columns(1).Width = 3000 DGBARANG.Columns(1).AllowSizing = False DGBARANG.Columns(2).Caption = "SATUAN"

DGBARANG.Columns(2).Width = 2000 DGBARANG.Columns(2).AllowSizing = False End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii)))

If KeyAscii = 13 Then

If Len(Text1.Text) <> 5 Then

MsgBox "KODE HARUS 5 KARAKTER", vbCritical, "INGAT !!"

Text1.SetFocus Else

Text2.SetFocus End If

End If End Sub

Private Sub Text1_LostFocus() Dim sql As String

sql = " SELECT * FROM BARANG WHERE KdBrg=('" & Text1.Text & "')"

(13)

Set rsbarang = CN.Execute(sql) If Not rsbarang.EOF Then Text1.Text = rsbarang("KdBrg") Text2.Text = rsbarang("NmBrg") Text3.Text = rsbarang("Satuan") End If

End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii)))

If KeyAscii = 13 Then Text3.SetFocus End If

End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii)))

If KeyAscii = 13 Then CmdSave.Enabled = True CmdSave.SetFocus End If

End Sub

#####FORM SPEKSIFIKASI#####

Dim Rsspeksifikasi As New ADODB.Recordset Private Sub CmdKeluar_Click()

Unload Me End Sub

Sub clickkosong() Txtnmbrg.SetFocus Txtkdbrg.Text = ""

Txtnmbrg.Text = ""

Txtsatuan.Text = ""

TxtHarga.Text = ""

TxtStok.Text = ""

CMDSIMPAN.Enabled = True CMDUBAH.Enabled = False CMDHAPUS.Enabled = False End Sub

Private Sub CmdCancel_Click() Text1.Enabled = True

Call KOSONG

CmdEdit.Enabled = False CmdDelete.Enabled = False CmdSave.Enabled = True

(14)

Text1.SetFocus End Sub

Private Sub CmdDelete_Click()

A = MsgBox("Apakah Data dengan No Urut : " & Text1.Text & " Akan dihapus ", vbYesNo + vbQuestion, "Mesagge")

If A = vbYes Then

CN.Execute "delete * from speksifikasi where nourutsp ='" & Text1.Text & "'"

tampil

Text1.Enabled = True Call KOSONG

End If End Sub

Private Sub CmdEdit_Click() Dim sql As String

sql = "select *from SPEKSIFIKASI " & "where NOURUTSP=('" & Text1.Text & "')"

Set Rsspeksifikasi = CN.Execute(sql) If Rsspeksifikasi.EOF Then

MsgBox "No Urut : " & Text1.Text & " tidak ada", vbInformation, "Message"

Else

CN.Execute "update speksifikasi set harga='" & Text2.Text & "',mincetak = '" & Text3.Text _ & "',ket= '" & Text4.Text & "', kdbrg= '" & Combo1.Text & "' where nourutsp='" &

Text1.Text & "'"

MsgBox " Data dengan No Urut : " & Text1.Text & " sudah diubah ", vbInformation,

"Message"

tampil Call KOSONG End If

End Sub

Private Sub CmdSave_Click() Dim sql As String

sql = "select *from speksifikasi " & "where nourutsp =('" & Text1.Text & "')"

Set Rsspeksifikasi = CN.Execute(sql)

A = MsgBox("Apakah data akan disimpan", vbYesNo + vbQuestion, "Message") If A = vbYes Then

If Not Rsspeksifikasi.EOF Then

MsgBox " No Urut : " & Text1 & " Sudah pernah tersimpan ", vbInformation,

"Message"

Call KOSONG

ElseIf Text1.Text = "" Then

MsgBox "No urut harus disi", vbInformation, "Message"

Text1.SetFocus

ElseIf Text2.Text = "" Then

MsgBox "Harga harus disi", vbInformation, "Message"

Text2.SetFocus

ElseIf Text3.Text = "" Then

(15)

MsgBox "Minimal cetak harus disi", vbInformation, "Message"

Text3.SetFocus

ElseIf Text4.Text = "" Then

MsgBox "keterangan harus disi", vbInformation, "Message"

Text4.SetFocus

ElseIf Combo1.Text = "" Then

MsgBox "Kode barang harus disi", vbInformation, "Message"

Combo1.SetFocus Else

CN.Execute "insert into speksifikasi values ('" & Text1.Text & "','" & Text2.Text & "','" & _ Text3.Text & "','" & Text4.Text & "','" & Combo1.Text & "')"

tampil

Text1.Enabled = True Call KOSONG

CmdEdit.Enabled = False CmdDelete.Enabled = False End If

End If End Sub

Private Sub CmdExit_Click() Unload Me

End Sub

Private Sub Dgspekbarang_Click()

CN.Execute "select*from speksifikasi where nourutsp ='" & Text1.Text & "'"

Text1.Text = Dgspekbarang.Columns![0]

Text2.Text = Dgspekbarang.Columns![1]

Text3.Text = Dgspekbarang.Columns![2]

Text4.Text = Dgspekbarang.Columns![3]

Combo1.Text = Dgspekbarang.Columns![4]

CmdEdit.Enabled = True CmdDelete.Enabled = True CmdSave.Enabled = False Text1.Enabled = False Text2.SetFocus End Sub

Private Sub Form_Activate() Text1.SetFocus

End Sub

Private Sub Form_Load() BUKADATABASE

Set Rsspeksifikasi = New ADODB.Recordset

Rsspeksifikasi.Open "select * from speksifikasi ", CN, adOpenDynamic, adLockOptimistic tampil

CmdEdit.Enabled = False

(16)

CmdDelete.Enabled = False

Set Rsspeksifikasi = CN.Execute("select distinct kdbrg from barang") Do While Not Rsspeksifikasi.EOF

Combo1.AddItem (Rsspeksifikasi.Fields(0).Value) Rsspeksifikasi.MoveNext

Loop End Sub

Private Sub TxtSatuan_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii)))

If KeyAscii = 13 Then TxtHarga.SetFocus End If

End Sub Sub tampil()

Set Rsspeksifikasi = New ADODB.Recordset

Rsspeksifikasi.Open "select*from speksifikasi ", CN, adOpenDynamic, adLockOptimistic Rsspeksifikasi.Sort = "nourutsp ASC"

Set Dgspekbarang.DataSource = Rsspeksifikasi grid

End Sub Sub grid()

Dgspekbarang.AllowRowSizing = False

Dgspekbarang.Columns(0).Caption = "No Urut"

Dgspekbarang.Columns(0).Width = "1000"

Dgspekbarang.Columns(0).AllowSizing = False Dgspekbarang.Columns(1).Caption = " Harga"

Dgspekbarang.Columns(1).Width = "1000"

Dgspekbarang.Columns(1).AllowSizing = False

Dgspekbarang.Columns(2).Caption = " Min_cetak"

Dgspekbarang.Columns(2).Width = "1500"

Dgspekbarang.Columns(2).AllowSizing = False Dgspekbarang.Columns(3).Caption = " Ket"

Dgspekbarang.Columns(3).Width = "1000"

Dgspekbarang.Columns(3).AllowSizing = False

Dgspekbarang.Columns(4).Caption = " Kd_Barang"

Dgspekbarang.Columns(4).Width = "1500"

Dgspekbarang.Columns(4).AllowSizing = False End Sub

(17)

Sub KOSONG()

Text1.Enabled = True Text1.Text = ""

Text2.Text = ""

Text3 = ""

Text4 = ""

Combo1.Text = ""

Text1.SetFocus End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii)))

If KeyAscii = 13 Then Text2.SetFocus End If

End Sub

Private Sub Text1_LostFocus() Dim sql As String

sql = "select*from speksifikasi " & " where nourutsp =('" & Text1.Text & "')"

Set Rsspeksifikasi = CN.Execute(sql) If Not Rsspeksifikasi.EOF Then

Text1.Text = Rsspeksifikasi("nourutsp") Text2.Text = Rsspeksifikasi("harga") Text3.Text = Rsspeksifikasi("mincetak") Text4.Text = Rsspeksifikasi("ket") Combo1.Text = Rsspeksifikasi("kdbrg") End If

End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii)))

If KeyAscii = 13 Then Text3.SetFocus End If

End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii)))

If KeyAscii = 13 Then Text4.SetFocus End If

End Sub

(18)

#####FORM ENTRY SLIP ORDER#####

Dim rsspekbarang As New ADODB.Recordset Dim RSPEMESAN As New ADODB.Recordset Dim RSORDER As New ADODB.Recordset Dim rsdetailbarang As New ADODB.Recordset Private Sub CmdKeluar_Click()

Unload Me End Sub

Private Sub Combo1_Click()

Set RSPEMESAN = CN.Execute(" SELECT * FROM PEMESAN WHERE KDPMSN='" & Combo1

& "'")

If Not RSPEMESAN.EOF Then

Text4.Text = RSPEMESAN("NMPMSN") End If

End Sub

Private Sub Combo2_Click()

Set rsdetailbarang = CN.Execute(" SELECT * FROM QSPEKBARANG WHERE KDBRG='" &

Combo2 & "'")

If Not rsdetailbarang.EOF Then

Text5.Text = rsdetailbarang("Nourutsp") Text6.Text = rsdetailbarang("Nmbrg") Text7.Text = rsdetailbarang("Satuan") Text8.Text = rsdetailbarang("Mincetak") Text9.Text = ""

Text10.Text = rsdetailbarang("Harga") Text11.Text = rsdetailbarang("KET")

Text9.SetFocus End If

End Sub

Private Sub Form_Load() BUKADATABASE

DTPicker1 = Format(Date, "DD-MM-YYYY") DTPicker2 = Format(Date, "DD-MM-YYYY") Text2.Text = Format(Time, "hh:mm") Text3.Text = Format(Time, "hh:mm") 'CMDSIMPAN.Enabled = False

AUTO Flex

Set RSPEMESAN = CN.Execute("select distinct kdpmsn from pemesan") Do While Not RSPEMESAN.EOF

Combo1.AddItem (RSPEMESAN.Fields(0).Value) RSPEMESAN.MoveNext

Loop

(19)

Set rsspekbarang = CN.Execute("select distinct kdBRG from QSPEKBARANG") Do While Not rsspekbarang.EOF

Combo2.AddItem (rsspekbarang.Fields(0).Value) rsspekbarang.MoveNext

Loop End Sub Sub Flex()

MSFlexGrid1.FormatString = "NO | KD BRG | NO URUT | NM BARANG

| SATUAN | MINCETAK | JML PSN | HARGA | KET | TOTAL “ End Sub

Private Sub CmdBatal_Click() With MSFlexGrid1

BATAL = 1

Do Until BATAL > 10

If .TextMatrix(BATAL, 0) = "" Then Exit Do

Else

BATAL = BATAL + 1 End If

Loop

MSFlexGrid1.Rows = MSFlexGrid1.Rows - BATAL + 1 MSFlexGrid1.Clear

Call KOSONG Flex

End With End Sub

Private Sub CmdSimpan_Click() Dim SIMPAN As String

If Text13.Text = "" Then

MsgBox "isi potongan ", vbInformation, "pesan"

Text13.SetFocus

ElseIf Text14.Text = "" Then

MsgBox "isi Dp ", vbInformation, "pesan"

Text14.SetFocus

ElseIf Combo1.Text = "" Then

MsgBox "pilih NoPemesan ", vbInformation, "pesan"

Combo1.SetFocus Else

sql = "INSERT INTO SLIPORDER values('" & Text1.Text & "','" & DTPicker1.Value & "','" &

Text2.Text & "','" & DTPicker2.Value & _

"','" & Text3.Text & "','" & Text13.Text & "','" & Text14.Text & "','" & Combo1.Text & "')"

CN.Execute (sql) With MSFlexGrid1 SIMPAN = 1

Do While SIMPAN <= 1000

If .TextMatrix(SIMPAN, 0) = "" Then

(20)

Exit Do

Else CN.Execute " INSERT INTO CETAK VALUES ('" & .TextMatrix(SIMPAN, 2) & "','" &

.TextMatrix(SIMPAN, 6) & "','" & .TextMatrix(SIMPAN, 7) & "','" & .TextMatrix(SIMPAN, 8) &

"','" & Text1.Text & "','" & .TextMatrix(SIMPAN, 1) & "')"

SIMPAN = SIMPAN + 1 End If

Loop

MsgBox "DATA SUDAH TERSIMPAN ", vbOKOnly, "PESAN"

MSFlexGrid1.Rows = MSFlexGrid1.Rows - SIMPAN + 1 MSFlexGrid1.Clear

FlexAUTO End With Call ALLZERO

CMDSIMPAN.Enabled = False End If

End Sub Sub ALLZERO() Combo1 = ""

Combo2 = ""

Text4 = ""

Text5 = ""

Text6 = ""

Text7 = ""

Text8 = ""

Text9 = ""

Text10 = ""

Text11 = ""

Text12 = ""

Text13 = ""

Text14 = ""

Text15 = ""

End Sub

Private Sub CMDTAMBAH_Click() On Error Resume Next

If Combo2.Text = "" Then

MsgBox "Pilih KdBrg Yang ada Pada Combo Barang", vbOKOnly, "CHEECK !"

Combo2.SetFocus

ElseIf Text9.Text = "" Then

MsgBox "Isi Jumlah pesan ", vbOKOnly, "Message !"

Text9.SetFocus

ElseIf Text10.Text = "" Then

MsgBox "Isi Harga !", vbOKOnly, "Message!"

Text10.SetFocus

(21)

ElseIf Text11.Text = "" Then

MsgBox "Isi Keterangan !", vbOKOnly, "Message!"

Text11.SetFocus Else

BARIS = MSFlexGrid1.Row

MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1

MSFlexGrid1.TextMatrix(BARIS, 0) = MSFlexGrid1.Row + 0 MSFlexGrid1.TextMatrix(BARIS, 1) = Combo2.Text

MSFlexGrid1.TextMatrix(BARIS, 2) = Text5.Text MSFlexGrid1.TextMatrix(BARIS, 3) = Text6.Text MSFlexGrid1.TextMatrix(BARIS, 4) = Text7.Text MSFlexGrid1.TextMatrix(BARIS, 5) = Text8.Text MSFlexGrid1.TextMatrix(BARIS, 6) = Text9.Text MSFlexGrid1.TextMatrix(BARIS, 7) = Text10.Text MSFlexGrid1.TextMatrix(BARIS, 8) = Text11.Text MSFlexGrid1.TextMatrix(BARIS, 9) = Text16.Text

Text12.Text = Val(Text12.Text) + Val(MSFlexGrid1.TextMatrix(BARIS, 9)) MSFlexGrid1.Row = MSFlexGrid1.Row + 1

Flex

Call KOSONG

MsgBox "SATU RECORD BERTAMBAH !", vbInformation, "ATTENTION...!"

CMDSIMPAN.Enabled = True End If

End Sub Sub KOSONG() Combo2 = ""

Text5 = ""

Text6 = ""

Text7 = ""

Text8 = ""

Text9 = ""

Text10 = ""

Text11 = ""

Text16 = ""

End Sub Sub AUTO()

Set RSORDER = New ADODB.Recordset RSORDER.Open "select*from sliporder", CN

Text1.Text = "00" + Trim(Str(RSORDER.RecordCount + 1)) End Sub

Private Sub Text10_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then

Text11.SetFocus End If

End Sub

(22)

Private Sub Text14_Change()

Text15.Text = Val(Text12.Text) - Val(Text13.Text) - Val(Text14) End Sub

Private Sub Text9_Change()

Text16.Text = Val(Text9) * Val(Text10) End Sub

Private Sub Text9_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then

Text10.SetFocus End If

End Sub

#####FORM CETAK SLIP ORDER#####

Dim RSSLIPORDER As New ADODB.Recordset Private Sub CmdBatal_Click()

KOSONG End Sub

Private Sub CMDCETAK_Click()

Set RSSLIPORDER = New ADODB.Recordset If Combo1.Text = "" Then

MsgBox "PILIH NO ORDER YANG ADA PADA COMBO", vbOKOnly, "CHECK"

Combo1.SetFocus Else

sql = "SELECT * FROM QCETAKSLIPORDER WHERE Noorder ='" & Combo1 & "'"

Set RSSLIPORDER = CN.Execute(sql)

SARING = "{QCETAKSLIPORDER.Noorder}='" & Combo1 & "'"

With Cr

.DataFiles(0) = App.Path & "\PEMESANAN.mdb"

.ReportFileName = App.Path + "\SLIP_ORDER.RPT"

.Destination = crptToWindow .WindowState = crptMaximized .ReplaceSelectionFormula (SARING) .Action = 1

End With End If End Sub

Private Sub CmdKeluar_Click() Unload Me

End Sub

Private Sub Combo1_Click()

Set RSSLIPORDER = CN.Execute(" SELECT * FROM SLIPORDER WHERE Noorder='" &

Combo1 & "'")

(23)

If Not RSSLIPORDER.EOF Then

Text1.Text = RSSLIPORDER("Tmorder") Text2.Text = RSSLIPORDER("Kdpmsn") End If

End Sub

Private Sub Form_Load() BUKADATABASE

Set RSSLIPORDER = New ADODB.Recordset

RSSLIPORDER.Open " SELECT * FROM SLIPORDER ", CN, adOpenDynamic, adLockOptimistic

ISINOORDER

End Sub Sub KOSONG() Combo1 = ""

Text1 = ""

Text2 = ""

End Sub

Sub ISINOORDER()

Set RSSLIPORDER = CN.Execute(" SELECT DISTINCT Noorder FROM SLIPORDER ") Do While Not RSSLIPORDER.EOF

Combo1.AddItem (RSSLIPORDER.Fields(0).Value) RSSLIPORDER.MoveNext

Loop End Sub

#####FORM ENTRY BP#####

Dim RSBP As New ADODB.Recordset Dim RSORDER As New ADODB.Recordset Private Sub CmdBatal_Click()

Call KOS End Sub

Private Sub CMDCETAK_Click() FrmCetakBP.Show vbModal End Sub

Private Sub CmdSimpan_Click() Dim SIMPAN As String

sql = " SELECT * FROM BP " & " WHERE NOBP= '" & Text1.Text & "'"

Set RSBP = CN.Execute(sql)

If Not RSBP.EOF Then

MsgBox "NO BP: << " & Text1.Text & " >> SUDAH PERNAH DI SIMPAN", vbOKOnly + vbInformation, "<<WARNING>>"

(24)

ElseIf Combo1.Text = "" Then

MsgBox "PILIH NO ORDER DI COMBO", vbOKOnly + vbInformation, "CHECK"

Else

A = "INSERT INTO BP VALUES('" & Text1.Text & "','" & DTPicker1.Value & "','" &

Combo1.Text & "')"

CN.Execute (A)

MsgBox "BUKRI BAYAR DENGAN NO : " & Text1.Text & " SUDAH TERSIMPAN", vbInformation, "PESAN"

Call KOS AUTO End If End Sub

Private Sub Combo1_Click()

Set RSORDER = New ADODB.Recordset

RSORDER.Open " SELECT * FROM QENTRYBAYAR WHERE NoORDER LIKE '" & Combo1.Text

& "%'", CN, adOpenDynamic, adLockOptimistic Set DataGrid1.DataSource = RSORDER

grid End Sub

Private Sub Command1_Click() Unload Me

End Sub

Private Sub Form_Load() BUKADATABASE

tampil

DTPicker1 = Format(Now, "DD-MM-YYYY") AUTOISINOORDER

Text1.Enabled = False End Sub

Sub AUTO()

Set RSORDER = New ADODB.Recordset RSORDER.Open " SELECT * FROM BP ", CN

Text1.Text = "BY00" + Trim(Str(RSORDER.RecordCount + 1)) End Sub

Sub tampil()

Set RSORDER = New ADODB.Recordset

RSORDER.Open "SELECT * FROM QENTRYBAYAR WHERE Noorder ='" & Combo1.Text & "'", CN

RSORDER.Sort = "Noorder ASC"

Set DataGrid1.DataSource = RSORDER grid

End Sub

(25)

Sub grid()

DataGrid1.AllowRowSizing = False

DataGrid1.Columns(0).Caption = "NAMA BARANG"

DataGrid1.Columns(0).Width = 1500 DataGrid1.Columns(0).AllowSizing = False DataGrid1.Columns(1).Caption = "SATUAN"

DataGrid1.Columns(1).Width = 3000 DataGrid1.Columns(1).AllowSizing = False DataGrid1.Columns(2).Caption = "HARGA"

DataGrid1.Columns(2).Width = 2000 DataGrid1.Columns(2).AllowSizing = False DataGrid1.Columns(3).Caption = "QTY"

DataGrid1.Columns(3).Width = 2000 DataGrid1.Columns(3).AllowSizing = False DataGrid1.Columns(4).Caption = "TOTAL"

DataGrid1.Columns(4).Width = 2000 DataGrid1.Columns(4).AllowSizing = False DataGrid1.Columns(5).Width = 0

DataGrid1.Columns(6).Width = 0 DataGrid1.Columns(7).Width = 0 End Sub

Sub ISINOORDER()

Set RSSLIPORDER = CN.Execute(" SELECT DISTINCT Noorder FROM SLIPORDER ") Do While Not RSSLIPORDER.EOF

Combo1.AddItem (RSSLIPORDER.Fields(0).Value) RSSLIPORDER.MoveNext

Loop End Sub Sub KOS() Combo1 = ""

tampil End Sub

(26)

#####FORM CETAK BP#####

Dim RSBP As New ADODB.Recordset Private Sub CmdBatal_Click() KOSONG

End Sub

Private Sub CmdKeluar_Click() Unload Me

End Sub

Private Sub Combo1_Click()

Set RSBP = CN.Execute(" SELECT * FROM BP WHERE NoBP='" & Combo1 & "'") If Not RSBP.EOF Then

Text1.Text = RSBP("TGLBP") Text2.Text = RSBP("NOORDER") End If

End Sub

Private Sub Command1_Click() Set RSBP = New ADODB.Recordset If Combo1.Text = "" Then

MsgBox "PILIH NO BP YANG ADA PADA COMBO", vbOKOnly, "CHECK"

Combo1.SetFocus Else

sql = "SELECT * FROM QBUKTIBAYAR WHERE NOBP ='" & Combo1 & "'"

Set RSBP = CN.Execute(sql)

SARING = "{QBUKTIBAYAR.NOBP}='" & Combo1 & "'"

With Cr

.DataFiles(0) = App.Path & "\PEMESANAN.mdb"

.ReportFileName = App.Path + "\BUKTI_PEMBAYARAN.RPT"

.Destination = crptToWindow .WindowState = crptMaximized .ReplaceSelectionFormula (SARING) .Action = 1

End With End If End Sub

Private Sub Command2_Click() Combo1 = ""

Text1 = ""

Text2 = ""

End Sub

Private Sub Command3_Click() Unload Me

End Sub

(27)

Private Sub Form_Load() BUKADATABASE

Set RSBP = New ADODB.Recordset

RSBP.Open " SELECT * FROM BP ", CN, adOpenDynamic, adLockOptimistic ISINOBP

End Sub Sub KOSONG() Combo1 = ""

Text1 = ""

Text2 = ""

End Sub Sub ISINOBP()

Set RSBP = CN.Execute(" SELECT DISTINCT NoBP FROM BP ") Do While Not RSBP.EOF

Combo1.AddItem (RSBP.Fields(0).Value) RSBP.MoveNext

Loop End Sub

#####FORM CETAK LAPORAN PEMESANAN#####

Dim RSQLAPPEMESAN As New ADODB.Recordset Private Sub Command1_Click()

RSQLAPPEMESAN.Filter = "Tglbp >= '" & DTPicker1.Value & "' AND Tglbp <='" &

DTPicker2.Value & "'"

If DTPicker2.Value < DTPicker1.Value Then

MsgBox "TANGGAL AKHIR HARUS LEBIH BESAR DARI TANGGAL AWAL", vbOKOnly + vbInformation, "WARNING"

ElseIf RSQLAPPEMESAN.EOF Then

MsgBox "TRANSAKSI DARI TANGGAL :" & DTPicker1.Value & " S/D " & DTPicker2.Value

& " TIDAK ADA ", vbInformation, "PERINGATAN"

Else

Cr.ReportFileName = "" & App.Path & "\LAPORAN_PEMESANAN.RPT"

Cr.SelectionFormula = "{QLAPPEMESANAN.Tglbp}>=#" & Format(DTPicker1.Value,

"M/D/YY") & " # AND {QLAPPEMESANAN.Tglbp}<=#" & Format(DTPicker2.Value, "M/D/YY")

& "#"

Cr.Formulas(1) = "TGLAWAL='" & Format(DTPicker1.Value, "DD/MM/YYYY") & "'"

Cr.Formulas(2) = "TGLAKHIR='" & Format(DTPicker2.Value, "DD/MM/YYYY") & "'"

Cr.WindowState = crptMaximized Cr.RetrieveDataFiles

Cr.Action = 1 End If

End Sub

(28)

Private Sub Command2_Click() Unload Me

End Sub

Private Sub Form_Load() BUKADATABASE

Set RSQLAPPEMESAN = New ADODB.Recordset

RSQLAPPEMESAN.Open "SELECT*FROM QLAPPEMESANAN ", CN, adOpenDynamic, adLockOptimistic

DTPicker1 = Format(Now, "DD-MM-YYYY") DTPicker2 = Format(Now, "DD-MM-YYYY") End Sub

(29)

LAMPIRAN 3

BENTUK HASIL KELUARAN PROGRAM

(30)
(31)
(32)
(33)

LAMPIRAN 4

LEMBAR BERITA ACARA KONSULTASI DENGAN PEMBIMBING KKP

(34)
(35)

LAMPIRAN 5

LEMBAR BERITA ACARA KONSULTASI KE INSTANSI

(36)

Referensi

Dokumen terkait

LAMPIRAN B ANALISA MASUKAN SISTEM BERJALAN LAMPIRAN C RANCANGAN KELUARAN USULAN LAMPIRAN D RANCANGAN MASUKAN USULAN LAMPIRAN E SURAT KETERANGAN RISET LAMPIRAN F BIODATA

sekitar aku coba sudah pa maafkan diri bapa karena sudah menyakiti diri sendiri dan imbasnya ke keluarga semoga bapa memang sudah memaafkan diri sendiri jadi

Lampiran 1 Dokumen Masukan Lampiran 2 Dokumen Keluaran Lampiran 3 Halaman Utama Sistem Lampiran 4 Halaman Produk – Sound Lampiran 5 Halaman Produk – Lighting Lampiran 6

- Template formulir berita acara serah terima berkas penerimaan SPT terdapat pada butir III.C dalam Lampiran II ini. - Formulir berita acara serah terima berkas penerimaan

Tujuan antar muka pemakai adalah agar sistem komputer dapat digunakan untuk menunjuk pada kemampuan yang dimiliki oleh piranti lunak atau program aplikasi yang mudah dioperasikan

Coba petakan dulu, baru di paragraph terakhir subbab ini disebutkan, dari sekian banyak penelitian terdahulu belum ada yang meneliti tentang Nouman dan tafsirnya sehingga

Private Sub tkdbrg_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then. tnmbrg.SetFocus

nelayan terhadap dampak ketiga faktor tersebut, maka penulis tertarik ntuk meneliti lebih lanjut pada sektor perikanan dan kelautan ini dengan judul “Analsisis