[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

FORMULA PROBLEM VERY EASY POINTS!

Posted on 1998-01-12
3
Medium Priority
?
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

656 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