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

Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jdc1944Commented:
do you have the data type for the 'Amount' set to double in its table?
0
jdc1944Commented:
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
0
clarkscottCommented:
Are you displaying this in a texbox on a form?  If so, make sure your textbox isn't formatted to no decimal.
Scott C
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

peter57rCommented:
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?
0
Paul_Harris_FusionCommented:
If this is simply how the results show when you execute the query directly then you have three options:
1. Create a report based on the query and specify the exact formatting you want
2. Create a form based on the query and specify the exact formatting you want
3. Modify your query to return a formatted string (below)

SELECT Transactions.ID, Transactions.SupplierName, Transactions.Reference, Transactions.[Transaction Date], Format(Sum(Transactions.Amount),"0.00") AS Invoiced
FROM Transactions
GROUP BY Transactions.ID, Transactions.SupplierName, Transactions.Reference, Transactions.[Transaction Date], Transactions.DocType
HAVING (((Transactions.DocType)="Invoice"));
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
THANKS VERY MUCH
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.