Check the rounding mode is what you expect before running your code. GetRoundMode; SetRoundMode();
Regards Jason -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of edsynergy Sent: Saturday, 24 June 2006 5:20 a.m. To: Jason Subject: [delphi-en] Rounding problem Hi I have a routine that does the following. Cycles through a record set and uses a procedure to get an invoice total for a particular day. This roughly how the code goes. Var Amount:currency; InvoiceTotal:currency Amount:= 0; While not eof begin InvoiceTotal:= 0; Getdailytotal(invoicetotal); Amount:= amount + InvoiceTotal; next End; Finally I post this into a database record Field = roundto(amount,-2); When I run it on my pc it works as advertised giving the exact total. When running on my clients pc its always very slightly out. ( but we are talking money here ) e.g I might get a value 332.00 but my client gets 330.71 My pc is running windows 2000 prof my client is running Windows xp. Any help appreciated Ed. ------------------------ Yahoo! Groups Sponsor --------------------~--> See what's inside the new Yahoo! Groups email. http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/i7folB/TM --------------------------------------------------------------------~-> ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/i7folB/TM --------------------------------------------------------------------~-> ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

