ronnie524 Posted June 9, 2005 Posted June 9, 2005 Hello all, I have this tiny problem, and been looking for couple days but can't seem to find the solution for solving the decimal calculation. So if there is a post on this issue, I apologize for re-posting and please post a link for me if possible ... I hope I could describe this as best as possible I am implementing a payroll check writter on my database but i faced a problem with the decimals. I don't know how to put it in words so please see this example: Shown on the Record: Gross Pay: 800.00 Fit: 73.62 Fica: 61.20 Sit: 14.37 ----------------- Net: 650.81 The real result (not shown on the record Gross Pay: 800.00 Fit: 73.623 Fica: 61.198 Sit: 14.374 -------------------- Net: 650.805 I have implemented the check writting created by Geoff Ryle, into my database, but it seems that it doesn't eliminate the extra decimal "5" even if the field shows 650.81 and writes: "Six Hundred Fifty and 80.5/100" instead of "Six Hundred Fifty and 81/100" Here is the cents calculation: Field Name: Cents Calculation: Round((Check Amount-Int(Check Amount))*100 +.00005, 2) Field Name: Cents Text Calculation: Case(Mod(Cents,100) = 00, "NO", Mod(Cents,100) < 10, "0" & Mod(Cents,100), Mod(Cents,100)) Hope this is understandable--- Bare with me ... Post link- related
RalphL Posted June 9, 2005 Posted June 9, 2005 I think Cents should be Round((Check Amount-Int(Check Amount))*100, 0) and Cents Text = Case(Cents = 0, "NO", Cents < 10, "0" & Cents, Cents)
ronnie524 Posted June 9, 2005 Author Posted June 9, 2005 RalphL... You are awesome... Can't thank you enough--- now I could write paychecks and stop writting 1200 checks by hand... or try a program that makes you sign up for payroll service or a program that limits the information input... ... ty... let me know if you need anything, will gladly help . You rock! Cheers ... Ron
Lee Smith Posted June 9, 2005 Posted June 9, 2005 Hi Ralph, My suggestion would be to deal with the rounding before they become part of the Net / Written Amount. Hi ronnie524, I prefer Ilyse Kazar approach. You can download a copy of her file from site http://www.datatude.net/ go to the Tips and Download area. See the attached file for my stab at your needs using her calculation. HTH Lee PayCheckDeduts.fp5.zip
-Queue- Posted June 9, 2005 Posted June 9, 2005 You can also shorten the cents calc to Case( Cents, Right( "0" & Cents, 2 ), "NO" )
ronnie524 Posted June 11, 2005 Author Posted June 11, 2005 Thank you all ... I guess whatsoever solution I use... it would give me the same answer .... Thank you all
ronnie524 Posted June 13, 2005 Author Posted June 13, 2005 Lee, thank you ... actually I was faced with another problem with decimals using "<***>" keys, your solution actually worked better ... ty yours truly, Ron
Recommended Posts
This topic is 7171 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now