Changing a field (1 Viewer)

sven2

Registered User.
Local time
Today, 00:44
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.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 00:44
Joined
Jul 9, 2003
Messages
16,360
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.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 09:44
Joined
Jan 20, 2009
Messages
12,856
Left([fieldname],4) & " " & Mid([fieldname],5,2)
 

sven2

Registered User.
Local time
Today, 00:44
Joined
Apr 28, 2007
Messages
297
Hello,

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

1234XX
1234XXX
1234XXXX

... etc

Sven.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 09:44
Joined
Jan 20, 2009
Messages
12,856
Left([fieldname],4) & " " & Mid([fieldname],5,Len([fieldname]-4))

Sorry. Bracket location typo in my post. The one below is correct.
 
Last edited:

rapsr59

Registered User.
Local time
Yesterday, 17:44
Joined
Dec 5, 2007
Messages
93
Try this.
Left(fldname, 4) & " " & Mid(fldname, 5, Len(fldname) - 4)
 

Users who are viewing this thread

Top Bottom