Unable to replace return/newline characters in Access but works in Excel

jimmy2

New Member
Joined
Feb 15, 2011
Messages
14
Hi Guys ,

I have the below code which i place in my make table design view and ideally is meant to remove all return and "Enter" Keys in access as well as newline

Replace([myfield]," " & Chr(10) & " " & Chr(13),"")

this doesnt seem to be doing the job but if i coppy the same row in excel it works fine even by using the ALT+0010.

Can you kindly advise me where im going wrong:confused:
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Do you actually have the space between the CR and LF characters? Try...

Replace([myfield]," " & Chr(10) & Chr(13),"")

Denis
 
Upvote 0
Do you actually have the space between the CR and LF characters? Try...

Replace([myfield]," " & Chr(10) & Chr(13),"")

Denis

Sooorry bout the late reply...

It something im never sure of as users just enter data randomly including these keys.

The workaround is running this in Excel as it works perfectly but when u have to re-write 50 queries then u know u not clever:(
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top