Solved

# FORMULA PROBLEM VERY EASY POINTS!

Posted on 1998-01-12
215 Views
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
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
• 2

LVL 5

Accepted Solution

julio011597 earned 50 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;

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

HTH, julio
0

Author Comment

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

Thanks,
Tony
0

LVL 5

Expert Comment

ID: 1356271
Thank you.
0

## Featured Post

Question has a verified solution.

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

### Suggested Solutions

creating threads in delphi 1 191
How to convert memory stream to PDF file 6 216
Problem working with dynamic array - help 2 45
Firemonkey Listview item popup menu ? 1 71
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Starting up a Project
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
###### Suggested Courses
Course of the Month8 days, 19 hours left to enroll