Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Very interesting problem

Status
Not open for further replies.

jay2502

Technical User
Apr 20, 2007
25
A2
I have an access database that i have created for a company
I have a tbl with a list of transactions I also have a Report that lists the transactions by the criteria(which is a field). In the report footer i have a field that is a =sum(of the relevant field) to calculate the list of tranactions

now my big problem the amount in the =sum(of the relevant field) field does not equal the amount that I calculate (on a calculater)while going through each transaction on the report.

I am very confused about the problem and if anyone can help I will be very grateful
 
Hi

How far out is it?

Could it be that the displayed results on each line are truncated to (say) 2 decimal places, but actually have "n" decimal places and the sum of all the small differences gives you your "error".



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
the figure is 7531.6 and its out by 1071
how could i slove the problem if it was that
 
Hi

You would have to have a lot of detail lines for the small errors to add to over 1000.

But, if you think this may be the problem, the first thing to consider is the datatype of your numeric field, if it is a Double or a Single you may get a more accurate result to changing it to a Decimal type with (say) two decimal places, or a currency tyupe if the values you are summing are money amounts.

Difficult to be specific here, since I know nothing about your data or what you are trying to do with it.


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Is it possible that any transaction(s) is listed more than once?
 
i've checked that and its not that
 
The interesting thing about 1071 is that it is divisible by 9, which is a common result when digits have been transposed.
 
Maybe it would be useful to give us the RowSource of the report and the expressions for the per row field and footer field.


-V
 
the rowsource is nb this is a sub form

SELECT TblTransaction.[Transaction Number], TblTransaction.[Vendor name], TblTransaction.[Requisition number], TblTransaction.[Vehicle Registration], TblTransaction.[Kilometer reading], TblTransaction.[Number of Litres filled], TblTransaction.Comment, TblTransaction.[Vendor inv number], (TblTransaction![Number of Litres filled])*TblTransaction![Transaction Number] AS [Total Fuel]

FROM TblTransaction GROUP BY TblTransaction.[Transaction Number], TblTransaction.[Vendor name], TblTransaction.[Requisition number], TblTransaction.[Vehicle Registration], TblTransaction.[Kilometer reading], TblTransaction.[Number of Litres filled], TblTransaction.Comment, TblTransaction.[Vendor inv number];
for the sub form the master form is connected by bp invoice field.
In the footer the total field is "=Sum([Number of Litres filled])"
Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top