Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jun 2002
    Location
    Placerville, California, USA
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Using Access 2003, a user is taking text from Word and doing a copy/paste into an Access form. If the text spans more than one line it is throwing a line break character into the table (it looks like a square "□"). This data then needs to be imported into another application and this messes up the import. I know I can export to Excel and do a find/replace to get rid of it...but it is an extra step. Is there an easy way in Access to delete it? I am by no means a programmer so it needs to be simple

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You can do it with an update query, but you'll have to experiment a bit. Make a backup copy of the database and practice on that first!

    Create a new query in design view, based on the relevant table.
    Add the relevant text or memo field to the query grid. Let's say it's named MyText.
    Select Query | Update query.
    This will add a row "Update to" to the query grid.
    Enter the following expression in this row:

    Replace([MyText],Chr(13),"")

    where MyText is the name of the field.
    Select Query | Run and confirm that you want to update the records.
    Take a look at the table to see if the box characters have disappeared.
    If not, switch back to the query and change Chr(13) to Chr(10) in the Replace expression.
    Select Query | Run.

  3. #3
    Lounger
    Join Date
    Jun 2002
    Location
    Placerville, California, USA
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks! I ended up having to do two separate updates queries...one replacing chr13 and the other one replacing char10.

    Figured out how to combine them in a macro to automate. Thanks again for your help!

Posting Permissions

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