format function

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
 
D

Douglas J. Steele

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)
 
F

fredg

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]))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top