Adding spaces to text

  • Thread starter Thread starter Anna
  • Start date Start date
A

Anna

I have requirements as to how long a field can be, so I
need to add filler characters.

ie--if I have text that ranges from "AAA" to "AAAAA" (3
characters to 5) and I want it to be followed by either 1,
2 or 3 spaces to make up my total of 6 in the field.

I've added leading zeroes to a data field that is numbers,
but can I use the same formatting technique for text
(Format ([field], "000000")?
 
This will give you trailing spaces up to 6 long.

"AAA" & Space(6-Len("AAA"))

Where "AAA" is the name of you field...
 
Back
Top