Results 1 to 3 of 3
  1. #1
    Yesideez is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Location
    Devon, UK
    Posts
    17

    Removing all carriage returns from a database

    Any idea how to quickly replace all carriage returns in all fields throughout a database with a space?



    I've just spent ages looking up pages in Google and can't seem to find anything.

    One idea was to export to XML, search & replace all carriage returns (done successfully) but importing back into Access I get an error telling me the XML format is invalid but doesn't say where.

    Is there an easy way to remove these carriage returns?

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    you're probably going to have to loop all your tables with code. did you search and repl. the returns AFTER you imported into access? I think you can do that with the dialog in all the tables (CTRL+F) and replace all "vbcr" or "vbcrlf" with something. I know for a fact that the dialog takes those inputs. If not those specifically, others.

    I'm 90% sure that recordset code will parse field values out so that you can check for "vbcr" and "vbcrlf". But if you print field values OUT, like to the immediate window, you will only see line feeds in the window if you encounter it in the field value's string. but it can be detected with the above 2 strings.

    never have been sure of the diff. between vbcr (vb carriage return) and vbcrlf (vb carriage return line feed), but they both take you to the next line.

  3. #3
    Yesideez is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2011
    Location
    Devon, UK
    Posts
    17
    Thanks, I'll give that a go.

    Difference between vbcr and vbcrlf

    I'm betting this will be for supporting Unix data and if they both take you to the next line then I'm thinking more for input as Windows uses \r\n for a new line whereas on Unix it only uses \r and I'm thinking vbcr is the latter.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-05-2010, 04:31 PM
  2. removing security from not my own database
    By zomas in forum Security
    Replies: 1
    Last Post: 08-01-2010, 10:43 PM
  3. MySQL Linked Tables - Carriage Return
    By warrenk in forum Access
    Replies: 1
    Last Post: 03-28-2010, 01:56 AM
  4. Importing html data - Carriage Return Problem
    By MichelleNZ in forum Import/Export Data
    Replies: 1
    Last Post: 11-26-2009, 05:13 PM
  5. How to force carriage return between strings?
    By Divardo in forum Reports
    Replies: 1
    Last Post: 05-21-2009, 10:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums