Robbydobbs Posted December 16, 2003 Posted December 16, 2003 I have a mileage field that has to have at least 6 digits. If the mileage shows 58,457 then it has to be 058,457. Is there any way to make the field do this?
John Caballero Posted December 16, 2003 Posted December 16, 2003 Yes there is (thanks Queue)! Assuming your mileage field is called Mileage. Create a calculated text field, call it cMileage. Right("000000" & Mileage,6)
Vaughan Posted December 16, 2003 Posted December 16, 2003 Or you could make the original field a text (not number) field and type the leading zero, but this will cause headaches if you need to use the value for some maths (you'll need to remember to use the TextToNum function each time). John's solution is better.
John Caballero Posted December 16, 2003 Posted December 16, 2003 Actually I learned that from Queue recently. I'd come up with an overly-complicated Case statement, but he showed me the way. Just like Peter Frampton.
Henry Posted December 17, 2003 Posted December 17, 2003 I agree with John, last time i also use complicated Case statement to do that. Actually this technique is also good for serial number calculation. Regards, Henry
Recommended Posts
This topic is 7717 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