DBEdits ($ (Money)) 
Author Message
 DBEdits ($ (Money))

Hello,
I have three DBEdits ($ (Money))on a Database (Paradox) and I want
DBEditAmount to be added to DBEditAmount2 and then the result put in
DBEditTotalAmount after a button is clicked to update the inputs.
DBEditAmount + DBEditAmount2 = DBEditTotalAmount.

I have tried different things and nothing I try works, I am getting
incompatable types etc.
I have not done much Database with delphi or Delphi math, so this is
very nrew to me.

Suggestions, ideas, code please?

--
All the best from James Sandbrook.

****************************************************************
http://www.*-*-*.com/
Beginners HTML-New Zealand Web Site Links-Family-Delphi-Pascal-
School Projects-Computer Terms-Free Downloads including Two
Player Knowledge And More...
****************************************************************
Camelia's Home Page & Stories.
Writers Combined!
http://www.*-*-*.com/
****************************************************************



Wed, 18 Jun 1902 08:00:00 GMT  
 DBEdits ($ (Money))
Try using the Tfields or the FieldByName properties of the Table object to add
up your values:

table1.Open;
   table1.first;
   table1.Edit;
   Table1Field3.AsCurrency := Table1Field1.AsCurrency +
       Table1Field2.AsCurrency;
   table1.Post;

or

table1.FieldByName('Field3').AsCurrency :=
table1.FieldByName('Field1').AsCurrency +
table1.FieldByName('Field2').AsCurrency;

********************************
Michael Glatz




Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. money, money, money

2. money money money money... ez and quick - money.txt (0/1)

3. money money money money... ez and quick - money.txt (1/1)

4. MONEY MONEY

5. problem with money denomination

6. Great Chance To Make Money!

7. 'Money wanted' algorithm (OOP version)

8. Make 300% profit or double your money in a month vGLFCbBJ

9. Make 300% profit or double your money in a month DHGwJCEw

10. Make 300% profit or double your money in a month FMAWDSGE

11. MAKE MONEY

 

 
Powered by phpBB® Forum Software