G
Guest
Hi Graha
I am creating a small accounts package, i need to have a reconciliation of payments in and out, my qry below works but it is slow in loading
too slow in fac
I you have any suggestions i would appreciate the hel
D
SELECT tblPayments.PaymentID, tblPayments.sequence, Format(FormatNumber([paymentdate]),"00000000") & Format([tblPayments.PaymentID],"000000") AS d, tblPayments.PaymentDate, tblPayments.BankDate, [bankdate] Is Not Null AS isbanked, tblPayments.Banked, tblPayments.Reference, tblPayments.Category, DSum("amount","tblPaymentDetails","[PaymentID]=" & [tblPayments].[PaymentID]) AS pa, IIf([isbanked],[pa],0) AS bankedPayment, tblPayments.receipt, IIf([receipt],[pa],0) AS income, IIf([receipt],0,-[pa]) AS expense, (Val(DSum("bankedPayment","qryReconciliation","[tblPayments.sequence]<=""" & [tblPayments.sequence] & """"))) AS bankedBalance, Format([paymentDate],"yyyymm") AS paymentMont
FROM tblPayments INNER JOIN tblPaymentDetails ON tblPayments.PaymentID = tblPaymentDetails.PaymentI
ORDER BY Format(FormatNumber([paymentdate]),"00000000") & Format([tblPayments.PaymentID],"000000")
I am creating a small accounts package, i need to have a reconciliation of payments in and out, my qry below works but it is slow in loading
too slow in fac
I you have any suggestions i would appreciate the hel
D
SELECT tblPayments.PaymentID, tblPayments.sequence, Format(FormatNumber([paymentdate]),"00000000") & Format([tblPayments.PaymentID],"000000") AS d, tblPayments.PaymentDate, tblPayments.BankDate, [bankdate] Is Not Null AS isbanked, tblPayments.Banked, tblPayments.Reference, tblPayments.Category, DSum("amount","tblPaymentDetails","[PaymentID]=" & [tblPayments].[PaymentID]) AS pa, IIf([isbanked],[pa],0) AS bankedPayment, tblPayments.receipt, IIf([receipt],[pa],0) AS income, IIf([receipt],0,-[pa]) AS expense, (Val(DSum("bankedPayment","qryReconciliation","[tblPayments.sequence]<=""" & [tblPayments.sequence] & """"))) AS bankedBalance, Format([paymentDate],"yyyymm") AS paymentMont
FROM tblPayments INNER JOIN tblPaymentDetails ON tblPayments.PaymentID = tblPaymentDetails.PaymentI
ORDER BY Format(FormatNumber([paymentdate]),"00000000") & Format([tblPayments.PaymentID],"000000")