In an MS Access 2007 project, I have a report with the following Record Source:
SELECT SomeTable.SomeCol FROM SomeTable;
SomeCol
should be either 1, 2, 3, 6, or 9 digits long.
Let's take the 3, 6 & 9 first. Say it is 123
- this should remain as 123
. If it's 123456
, this should be changed to 123.456
. If it's 123456789
, this should be changed to 123.456.789
. If it's 1
, or 65
, this should be changed to 001
and 065
respectively.
How can I modify my SELECT
to perform these changes? If the length is not 1, 2, 3, 6, or 9, the string should remain unmodified.
Thanks!
SomeCol
– Souther