[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

FORMULA PROBLEM VERY EASY POINTS!

Posted on 1998-01-12
3
Medium Priority
?
227 Views
Last Modified: 2010-04-04
I have a edit box that calculates the total for the items in a grid.  It works properly but when you add an item that ends in a zero such as $9.90, $9.00, $5.50 etc, it only shows the total as $24.4 instead of $24.40 can anyone tell me why that occurs?  I think this is fairly easy but I am offer 25pts.

Thanks,
Tony
0
Comment
Question by:aj85
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
julio011597 earned 200 total points
ID: 1356269
Isn't $9.90 nine dollars and 90 cents?

In the end of the procedure that computes the total, you should have something like:

TotalEdit.Text := '$' + Total;

Try something like this instead:

TotalEdit.Text := Format('$%.2f', [Total]);

HTH, julio
0
 

Author Comment

by:aj85
ID: 1356270
Worked like a charm! I am increasing your points by 25.

Thanks,
Tony
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1356271
Thank you.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question