Murray Brown
asked on
Access query not keeping decimal places from underlying table
Hi
I have an Access query that totals the Amount column (2 decimal places)but somehow doesn't keep the decimal places. How do I get around this?
I have an Access query that totals the Amount column (2 decimal places)but somehow doesn't keep the decimal places. How do I get around this?
SELECT Transactions.ID, Transactions.SupplierName, Transactions.Reference, Transactions.[Transaction Date], Sum(Transactions.Amount) AS Invoiced
FROM Transactions
GROUP BY Transactions.ID, Transactions.SupplierName, Transactions.Reference, Transactions.[Transaction Date], Transactions.DocType
HAVING (((Transactions.DocType)="Invoice"));
do you have the data type for the 'Amount' set to double in its table?
sorry i meant to say that for the 'Amount' field check the table for the following settings, presuming you want it to 2dp
Data Type: Number
Field Size: Decimal
Scale: 2
Decimal Points: 2
Data Type: Number
Field Size: Decimal
Scale: 2
Decimal Points: 2
Are you displaying this in a texbox on a form? If so, make sure your textbox isn't formatted to no decimal.
Scott C
Scott C
Do you mean that :
if the sum is 123.45 then the result shows as 123
OR
if the sum is 123.45 it shows as 12345
which?
if the sum is 123.45 then the result shows as 123
OR
if the sum is 123.45 it shows as 12345
which?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
THANKS VERY MUCH