December 5, 200619 yr How do I take a number field and make it add three other fields and ALWAYS be three a three digit number. For example: if the field adds 10, 15, 15, the answer in the field would be "040" or if I add 2, 2, 3, the field would contain "007" Thanks for your help Lester
December 5, 200619 yr Author I found how to calculate a field to be the number I want. Calc is: Right("000" & Int(Big Total),3) &"." & Middle(Round(Big Total-Int(Big Total),2) & "0",2,1) Works great! BUT I loose this formating when I add the field to to another field in a new calculation Field A & Field B & Field C How do I keep the my calc from loosing the leading zeros in a new calculation? Thanks Lester Edited December 5, 200619 yr by Guest
December 5, 200619 yr I merged your two posts as they amounted to a Double Post. Please do not start a thread when asking followup questions, just reply to your original thread. As you can see, I posted a similar calculation that you used. I'll see if I can spot the problem. Lee
December 5, 200619 yr In order to pad the 0s in your total, the field has to be text field in v6. If you then use that field in another calculation, the calculation engine will strip out the leading zeros (and trailing zeros after the "." also). You migh try adjusting your final calculation so that the padded 0s are put into it (too) for the final result. HTH Lee
December 5, 200619 yr Hi Lester, If you are adding numbers and wanting numeric results then why are you padding them with beginning zeros? As Lee says, numbers don't HAVE beginning zeros. You will continually struggle with this throughout your solution (converting all numbers using additional calculations); as you are realizing now. I can think of no reason that true numbers should be padded with leading zeros. LaRetta
December 5, 200619 yr Not to mention that the calculation will provide unexpected results if you have a number with a decimal in it. Lee
Create an account or sign in to comment