Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Nov 2003
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Deleting text (97)

    In a field showing postcode information [Postcode], because of typos, some records have two spaces between sections, and some have only one. I want to have only one - is there any easy way to delete out the additional space, given that space 5 should always be free?

    Regards. Blitz

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Deleting text (97)

    Since this is a one-time repair action, it is probably easiest to click in the Postcode field, select Edit/Replace... (Ctrl+H), and replace two spaces by a single space.

  3. #3
    Lounger
    Join Date
    Nov 2003
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Deleting text (97)

    As there are about 350,000 records, unfortunately this is not an option. I have tried this instead, and it seems to be working:

    Function PCodeTidy(TheString)
    Dim tmp1 As String
    Dim tmp2 As String
    Dim tmp3 As String


    If (IsNull(TheString)) Then
    PCodeTidy = Null
    Else
    tmp1 = Left(TheString, 4)
    tmp2 = Right(TheString, 3)
    tmp3 = tmp1 + tmp2
    PCodeTidy = tmp3
    End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •