Unable to investigate as I only have the FE files.
Two of your expressions here have CLng(....*100/100). Why?
What happens if you remove all of that?
So instead of:
Code:
SELECT DISTINCTROW costs.record, costs.date, CVDate(Format([date],"mmm yyyy")) AS mnth, costs.account, costs.inv, costs.merch, costs.product, costs.quantity, costs.cost, costs.discount, costs.cashbook, costs.[chq no], CLng(([quantity]*[cost]*(1-[discount]))*100)/100 AS [net total], costs.[gst rate], CLng(([net total]*[gst rate])*100)/100 AS gst, [net total]+[gst] AS [total inc gst], costs.[chq presented?]
FROM costs;
you use:
Code:
SELECT DISTINCTROW costs.record, costs.date, CVDate(Format([date],"mmm yyyy")) AS mnth, costs.account, costs.inv, costs.merch, costs.product, costs.quantity, costs.cost, costs.discount, costs.cashbook, costs.[chq no], ([quantity]*[cost]*(1-[discount]) AS [net total], costs.[gst rate], ([net total]*[gst rate]) AS gst, [net total]+[gst] AS [total inc gst], costs.[chq presented?]
FROM costs;
You should never use calculated values in others field in the same query as it can create unpredictable results.
You have reused both [net total] and gst.
Either create a second query for calculating those values or set out the calculation in full each time
So the second version above would become:
Code:
SELECT DISTINCTROW costs.record, costs.date, CVDate(Format([date],"mmm yyyy")) AS mnth, costs.account, costs.inv, costs.merch, costs.product, costs.quantity, costs.cost, costs.discount, costs.cashbook, costs.[chq no], ([quantity]*[cost]*(1-[discount]) AS [net total], costs.[gst rate], (([quantity]*[cost]*(1-[discount])*[gst rate]) AS gst,([quantity]*[cost]*(1-[discount])+(([quantity]*[cost]*(1-[discount])*[gst rate]) AS [total inc gst], costs.[chq presented?]
FROM costs;
When you look at that you may well realise that the [total inc gst] expression could probably be simplified!
Who knows what the outcome will be after you make those changes ... but it probably will be different
Also look at the number of decimal places and number format used for each field