How to add spaces to text in a field?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Access 2000. I have table of many hundreds of records. One of th fields of
text looks like this: XXXXXXXXXXXX and I want it to look like this: XXX XXX
XXX XXX by adding the spaces. Would someone please show me how to write the
function or code to add the spaces to the text as shown : Thanks
 
Try this

left(FieldName,3) & " " & mid(FieldName,4,3) & " " & mid(FieldName,7,3) & "
" & right(FieldName,3)
 
Thanks, Ofer. Worked great!

Ofer said:
Try this

left(FieldName,3) & " " & mid(FieldName,4,3) & " " & mid(FieldName,7,3) & "
" & right(FieldName,3)
 

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

Back
Top