How do I add leading zeros to this? BLDG: Mid([LOCATION],InStr([LOCATION],"-")+1) Please help.
C CS Apr 8, 2010 #1 How do I add leading zeros to this? BLDG: Mid([LOCATION],InStr([LOCATION],"-")+1) Please help.
M Marshall Barton Apr 8, 2010 #2 CS said: How do I add leading zeros to this? BLDG: Mid([LOCATION],InStr([LOCATION],"-")+1) Click to expand... How many zeros? If its alway the same number: BLDG: String(howmany, "0") & Mid(LOCATION, InStr(LOCATION, "-") + 1) If you want to pad it out so the result is a specific length: BLDG: Right(String(99, "0") & Mid(LOCATION, InStr(LOCATION, "-") + 1), specificlength)
CS said: How do I add leading zeros to this? BLDG: Mid([LOCATION],InStr([LOCATION],"-")+1) Click to expand... How many zeros? If its alway the same number: BLDG: String(howmany, "0") & Mid(LOCATION, InStr(LOCATION, "-") + 1) If you want to pad it out so the result is a specific length: BLDG: Right(String(99, "0") & Mid(LOCATION, InStr(LOCATION, "-") + 1), specificlength)
K KARL DEWEY Apr 9, 2010 #3 My response yesterday -- Left([YourField], InStr([YourField], "-")-1) & Right("00000" & Mid([YourField], InStr([YourField], "-")+1, 5)
My response yesterday -- Left([YourField], InStr([YourField], "-")-1) & Right("00000" & Mid([YourField], InStr([YourField], "-")+1, 5)