Air code in a form class:- Assuming phone no field is
called PhoneNum
Dim strLeftPart, strRightPart, strOrig, strFixedUp as string
strOrig = Me.PhoneNum
strLeftPart = Mid(strOrig,1,5)
strRightPart = Mid(strOrig,6)
strFixedUp = strLeftPart & " " & strRightPart
'strFixedUp now contains the amended value.
Me.PhoneNum = strFixedUp
Alternatively you could run an update query against the
table with something like:
UPDATE tblPhoneNumbers
SET tblPhoneNumbers.HomePhone = Mid([HomePhone],1,5) & " " &
Mid([HomePhone],6);
You'll need to substitute your own table and field names.
--
Nick Coe (UK)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.pjandcoe.co.uk/ Online Store
http://www.mrcomputersltd.com/ Repairs Upgrades
In news:E279E3F3-1E5E-4C87-A411-(E-Mail Removed),
Paul K. typed:
> I have a column of UK TELEPHONE no's with 11 digits in a
> line.
> I would like to add a space between digit 5 and digit 6
> 12345678911
> 12345 678911