Results 1 to 6 of 6
  1. #1
    shuddle is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    43

    Removal of Carriage Return in an Update Query

    I have email addresses that have a carriage return at the end of the email. I am trying to do an Update Query to removed them. Here is the SQL I have:

    UPDATE Tbl_DO_Stakeholder_data SET Tbl_DO_Stakeholder_data.PCO_Email = Replace([Tbl_DO_Stakeholder_data]![PCO_EMail],Chr(13)+Chr(10),"")

    When I run it, it want me to enter the parameter for Tbl_DO_Stakeholder_data!PCO_Email

    What am I doing wrong?

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    Remove the table name from the field ?
    Why use a full stop in one and exclamation in the other?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    shuddle is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    43
    Now it is asking for the parameter for PCO_Email

    UPDATE Tbl_DO_Stakeholder_data SET Tbl_DO_Stakeholder_data.PCO_Email = Replace([PCO_EMail],Chr(13)+Chr(10),"")

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Open the table in design view and look at the email field name. Is it PCO_Email or is that entered in the Caption?

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    I was thinking more of ?

    Code:
    UPDATE Tbl_DO_Stakeholder_data SET PCO_Email = Replace([PCO_EMail],Chr(13)+Chr(10),"")
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    shuddle is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    43
    That worked. Thank you for your help.

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

Similar Threads

  1. Replies: 2
    Last Post: 06-15-2019, 02:52 PM
  2. Carriage return
    By devcon in forum Queries
    Replies: 2
    Last Post: 12-28-2012, 02:56 AM
  3. Replies: 1
    Last Post: 02-08-2012, 04:44 PM
  4. Carriage return in a CSV file
    By btidwell3 in forum Import/Export Data
    Replies: 1
    Last Post: 09-09-2011, 05:19 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