Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2004
    Posts
    6

    Unanswered: Eliminating Spaces

    I have the following sample data

    Product ID Description
    12345 3" Round White Ball
    12376 3"RoundWhiteBall
    24832 3" Round WhiteBall

    What I need to do is eliminate the spaces between the description so I can eliminate Product ID's that have similar descriptions....is this possible????

  2. #2
    Join Date
    May 2003
    Posts
    144
    Have you tried using the function"REPLACE"?

    For example, REPLACE(description, ' ', '')

  3. #3
    Join Date
    Jan 2004
    Posts
    6

    How do I do that

    Do I put that in the criteria of the field description? Sorry for my ignorance...

  4. #4
    Join Date
    May 2003
    Posts
    144
    I assume you have the Description field on a form.
    You can add the REPLACE function on the afterupdate event of the Description field. For example,

    Private Sub Description_AfterUpdate
    Desription = REPLACE(Description, ' ', '')
    End Sub

    Hope this helps.

    SHK

  5. #5
    Join Date
    Jan 2004
    Posts
    6

    Query

    Actually it is in a Query

  6. #6
    Join Date
    May 2003
    Posts
    144
    The following query should give you a list of products with the same description.

    SELECT productid, Replace(Table1.description,' ','') FROM Table1;

    Hope this helps

    SHK

  7. #7
    Join Date
    Jan 2004
    Posts
    6

    It does not

    I have checked the results of the query and they are not duplicates...not exactly sure what it is producing????

Posting Permissions

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