format function

  • Thread starter Thread starter Michael SF
  • Start date Start date
M

Michael SF

I need to format a string like V92 into a 5 character long - filling in the
remaining 2 spots with spaces so that it looks like this

"V92 "

MUST be 5 characters long using " " as the dilimiter - any idea? - - doinig
this on a query not the raw data
 
If your string is always 3 characters, you can use [My3CharacterField] & "
" or [My3CharacterField] & Space$(2)

If your string has a variable number of characters, and you always want 5
characters, you can use Left$([MyField] & " ", 5) or Left$([MyField] &
Space$(5), 5)
 
I need to format a string like V92 into a 5 character long - filling in the
remaining 2 spots with spaces so that it looks like this

"V92 "

MUST be 5 characters long using " " as the dilimiter - any idea? - - doinig
this on a query not the raw data

=[FieldName] & space(5 - len([FieldName]))
 
Back
Top