Changing a field

sven2

Registered User.
Local time
Today, 11:35
Joined
Apr 28, 2007
Messages
297
Hello,

in a table I have the following data:

data result

1234TM 1234 TM
3478PM 3478 PM
3489 3489
3845TL 3845 TL
1238 1238

When showing this data in a field it has to look like this:

first the 4 numbers then an interspace and then the 2 letters.

How can I do this?

Thanks in advance,
Sven.
 
Are the strings "Always" 1234XX or 1234

Or do you get other Variations:
123
123XX
123X
12345
1234XXX
1234XXXX
12345XX
123456XX

If there are more variations please identify them.
 
Left([fieldname],4) & " " & Mid([fieldname],5,2)
 
Hello,

the first part of the string is always 4 numbers, after this it can be different.

1234XX
1234XXX
1234XXXX

... etc

Sven.
 
Left([fieldname],4) & " " & Mid([fieldname],5,Len([fieldname]-4))

Sorry. Bracket location typo in my post. The one below is correct.
 
Last edited:
Try this.
Left(fldname, 4) & " " & Mid(fldname, 5, Len(fldname) - 4)
 

Users who are viewing this thread

Back
Top Bottom