Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

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?
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"));

Open in new window

Avatar of jdc1944
jdc1944
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of clarkscott
Are you displaying this in a texbox on a form?  If so, make sure your textbox isn't formatted to no decimal.
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?
ASKER CERTIFIED SOLUTION
Avatar of Paul_Harris_Fusion
Paul_Harris_Fusion
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

THANKS VERY MUCH