Thanks for that but I guess what I was after was where do I hook up the math
with the fields. 
The DBEdit box won't allow entry of non-digits when its pointing at an Int
field in the database. 
The MASKEdit box dosn't point to a database field. 

Do I need to use an unbound Edit box and use events to programmatically load
in values and unload and validate it?
 
If yes then which events are the best to use?
 
If no then whats the easy way that I have missed?


Steven
> -----Original Message-----
> From: Alex Kouznetsov [mailto:[EMAIL PROTECTED]]
> Sent: 27 January 2003 4:49 pm
> To: Multiple recipients of list delphi
> Subject: Re: [DUG]: Dollar amounts in int fields
> 
> 
> Delphi cannot know that when storing cents in DB you actually 
> mean dollars.
> When you retrive data from your DB you need to devide 
> retrieved values by 100,
> and when you store data to DB you multiply your dollar values 
> by 100 to get
> cents.
> If you use SQL queries to retrive and store data then you can 
> just add *100 and
> /100 to your queries.
> 
> Alex
> 
> ----- Original Message -----
> From: "Steven Knight" <[EMAIL PROTECTED]>
> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> Sent: Monday, January 27, 2003 10:02 AM
> Subject: [DUG]: Dollar amounts in int fields
> 
> 
> > Hi all,
> >      Don't know if I'm being thick or if this is actually difficult.
> >
> > My database stores $ amounts in Int fields as cents.
> > I want to edit and display them to the user as a 999.99 format.
> > What facilities should I use in Delphi to achieve this?
> >
> > Steven Knight
> > Analyst / Programmer
> > Environment Canterbury
> > P.O. Box 345, Christchurch
> > phone: (03) 365-3828
> > email: [EMAIL PROTECTED]
> >
> >
> > Hey kids! (and parents) - have fun in the trash zone 
> learning to reduce waste
> http://www.ecan.govt.nz/Waste/waste-wastenotwantnot.html
> >
> >
> >
> > 
> **********************************************************************
> > This email and any files transmitted with it are confidential and
> > intended solely for the use of the individual or entity to whom they
> > are addressed. If you have received this email in error 
> please notify
> > the system manager.
> >
> > The contents of this email and any attachments are not formal
> > policy of Environment Canterbury, unless otherwise stated.
> > 
> **********************************************************************
> >
> > 
> --------------------------------------------------------------
> -------------
> >     New Zealand Delphi Users group - Delphi List - 
> [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> >
> >
> 
> --------------------------------------------------------------
> -------------
>     New Zealand Delphi Users group - Delphi List - 
> [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED] 
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> 


Hey kids! (and parents) - have fun in the trash zone learning to reduce waste 
http://www.ecan.govt.nz/Waste/waste-wastenotwantnot.html 



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

The contents of this email and any attachments are not formal 
policy of Environment Canterbury, unless otherwise stated.
**********************************************************************

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to