You are on page 1of 5

Option Compare Database

Private Sub cmdBukaRincianJurnalUmum_Click()

On Error Resume Next

no_invoice.Requery

'refresh

Dim invoice

Dim Rs As DAO.Recordset

invoice = no_invoice

'MsgBox invoice

Set Rs = CurrentDb.OpenRecordset("select id from rincian_jurnal_umum_detail where keterangan = '" &


no_invoice & "'")

If Rs.RecordCount > 0 Then Rs.MoveLast

'MsgBox Rs!id

DoCmd.Close

DoCmd.Close

'MsgBox Rs!id

DoCmd.OpenForm "rincian_jurnal_umum", , , "id = " & Rs!id & ""

End Sub

Private Sub cmdSimpan_Click()

On Error Resume Next

DoCmd.SetWarnings False

DoCmd.RunSQL "update tblManifestPerCustomer " _

& "set tanggal = '" & tanggal & "', " _

& "bank = '" & bank & "', " _


& "terima = '" & terima & "', " _

& "ket = '" & ket & "' " _

& "where no_invoice = '" & no_invoice & "'"

DoCmd.RunSQL "update tblInvoiceCetak " _

& "set tanggal = '" & tanggal & "', " _

& "bank = '" & bank & "', " _

& "terima = '" & terima & "', " _

& "ket = '" & ket & "' " _

& "where no_invoice = '" & no_invoice & "'"

MsgBox "Data sudah tersimpan!", vbInformation, "Info"

End Sub

Private Sub Command8_Click()

On Error Resume Next

Dim invoice

invoice = no_invoice

DoCmd.Close acForm, "TerimaPembayaranDariCustomer"

'If Screen.ActiveReport.Name = "rptInvoicePecah" Then

'Report_rptInvoicePecah.RecordSource = "SELECT tblInvoicePecah.* FROM tblInvoicePecah WHERE ((Not


(tblInvoicePecah.qty_header)=0)); "
'With Report_rptInvoicePecah

'End With

'Report_rptInvoicePecah.Requery

'DoCmd.Close acReport, "rptInvoicePecah"

'DoCmd.OpenReport "rptInvoicePecah", acViewReport

'refresh

'End If

'If Screen.ActiveReport.Name = "rptInvoiceCetak" Then

'Report_rptInvoiceCetak.RecordSource = "tblInvoiceCetak"

'Report_rptInvoiceSudahDicetak.Requery

'refresh

'End If

'If Screen.ActiveReport.Name = "rptManifestPerCustomer" Then

'Report_rptManifestPerCustomer.RecordSource = "tblManifestPerCustomer"

'Report_rptManifestPerCustomer.Requery

''refresh

'End If
End Sub

Private Sub Form_Activate()

On Error Resume Next

DoCmd.MoveSize , , 7000, 4500

tanggal.SetFocus

End Sub

Private Sub Form_Close()

On Error Resume Next

End Sub

Private Sub Form_Load()

On Error Resume Next

DoCmd.MoveSize , , 8000, 8000

txtCustomer.Requery

'refresh

tanggal.SetFocus
End Sub

You might also like