Jump to content

Fixed field size -3 characters


This topic is 5783 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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 by Guest
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 5783 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.