kiwiora Posted September 28, 2006 Posted September 28, 2006 How do I pad a number to ensure that it is always atleast 4 digits? The original DOCID is in the format of 0000. There is a field NumPages. So if on record 1, the DOCID = 0005, and the Numpages is 6, i have a script which basically runs and creates records with 0005 - 1 0006 - 2 0007 - 3 0008 - 4 0009 - 5 0010 - 6 but in reality it creates it as 0005 - 1 6 - 2 7 - 3 8 - 4 9 - 5 10 - 6 See the attached for a better explanation. I was thinking of using the count characters but I think I'm going about that the wrong way. login and password are both "admin" TIA example.zip
BobWeaver Posted September 29, 2006 Posted September 29, 2006 Right("0000"&DocID;4) is the general formula for padding zeroes onto a number
kiwiora Posted September 29, 2006 Author Posted September 29, 2006 doh! something so simple.. thanks!
Recommended Posts
This topic is 6692 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