dedy heru susanto...,
Terlampir adalah perbaikan yang telah saya lakukan. Saya buat module baru untuk mendefinisikan nilai saldo.
Function saldo_p(ByVal RecordID As Variant, nmtabel As Variant _
, fi_db As Variant, n_id As Variant, jn As Variant, id_toko As Variant _
, n_id_toko As Variant) As Double
Dim hs As Double
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("Select sum(" & fi_db & ") From " _
& nmtabel & " where " & n_id & "<=" & RecordID & " and " _
& jn & "=1" & " and " & id_toko & "=" & n_id_toko)
If Not rs.EOF Then
hs = Nz(rs.Fields(0), 0)
Else
hs = 0
End If
rs.Close
Set rs = Nothing
Set rs = CurrentDb.OpenRecordset("Select sum(" & fi_db & ") From " _
& nmtabel & " where " & n_id & "<=" & RecordID & " and " _
& jn & "<>1" & " and " & id_toko & "=" & n_id_toko)
If Not rs.EOF Then
hs = hs - Nz(rs.Fields(0), 0)
Else
hs = hs - 0
End If
rs.Close
Set rs = Nothing
saldo_p = hs
End Function
Query yang ada saya edit di a. Report source saya ubah juga menjadi query a.
Semoga sesuai harapan.
Hariyanto (Surabaya)
--------------------------------------------
On Mon, 25/8/14, dedy heru susanto d3dy_h3rus@yahoo.com [belajar-access] <belajar-access@yahoogroups.com> wrote:
Subject: Re: [belajar-access] Mohon Bantuan fungsi DSUM [1 Attachment]
To: belajar-access@yahoogroups.com
Date: Monday, 25 August, 2014, 1:27 PM
[Attachment(s) from dedy heru susanto
d3dy_h3rus@yahoo.com [belajar-access] included below]
1. waktu cetak report saldo
per item produk nilainya kok tidak sesuai
keinginan2. saldo akhirnya sudah ketemu
pakbagaimana caranya di report rekapan transaksi
tiap-tiap toko field saldo per item nilainya
benarsaya lampirkan print screen
masalahnya.terima kasih bantuannya
On Sunday, August
24, 2014 10:54 PM, "hari yanto har_i20002000@yahoo.com
[belajar-access]"
<belajar-access@yahoogroups.com> wrote:
dedy heru susanto...,
Bisa diuraikan lebih lanjut soal:
Apakah benar yang dimaksud
1. Saldo per item produk per hari transaksi (per baris per
item produk)
2. Saldo akhir per item produk(jml seluruh hari per item
produk)
3. Apakah rumus saldo: nilai bayar-nilai return-nilai
biaya?
Hariyanto (Surabaya)
--------------------------------------------
On Mon, 25/8/14, dedy heru susanto d3dy_h3rus@yahoo.com
[belajar-access] <belajar-access@yahoogroups.com>
wrote:
Subject: [belajar-access] Mohon Bantuan fungsi DSUM [1
Attachment]
To: belajar-access@yahoogroups.com
Date: Monday, 25 August, 2014, 7:52 AM
[Attachment(s) from dedy heru susanto
d3dy_h3rus@yahoo.com [belajar-access] included below]
Dear Allsaya
punya masalah tentang penggunaan fungsi DSUM untuk
menghitung sisa saldo pada query &
reportnyaTerlampir aplikasi Atas
bantuannya saya ucapkan terima kasih
Attachment(s) from hari yanto har_i20002000@yahoo.com [belajar-access] | View attachments on the web
1 of 1 File(s)
Posted by: hari yanto <har_i20002000@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (4) |
Tidak ada komentar:
Posting Komentar