December 16, 200322 yr 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?
December 16, 200322 yr Yes there is (thanks Queue)! Assuming your mileage field is called Mileage. Create a calculated text field, call it cMileage. Right("000000" & Mileage,6)
December 16, 200322 yr 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.
December 16, 200322 yr 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.
December 17, 200322 yr 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
Create an account or sign in to comment