Prev: Change position of acDialog form
Next: Tracking changes
From: CS on 8 Apr 2010 15:16 How do I add leading zeros to this? BLDG: Mid([LOCATION],InStr([LOCATION],"-")+1) Please help.
From: Marshall Barton on 8 Apr 2010 15:49 CS wrote: >How do I add leading zeros to this? > >BLDG: Mid([LOCATION],InStr([LOCATION],"-")+1) > 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) -- Marsh MVP [MS Access]
From: KARL DEWEY on 9 Apr 2010 11:34 My response yesterday -- Left([YourField], InStr([YourField], "-")-1) & Right("00000" & Mid([YourField], InStr([YourField], "-")+1, 5) -- Build a little, test a little. "CS" wrote: > How do I add leading zeros to this? > > BLDG: Mid([LOCATION],InStr([LOCATION],"-")+1) > > Please help.
|
Pages: 1 Prev: Change position of acDialog form Next: Tracking changes |