Connecting Tech Pros Worldwide Help | Site Map

Identifying carriage return in VBA

  #1  
Old July 10th, 2007, 02:35 PM
Bobby
Guest
 
Posts: n/a
Hi
I'm trying to export some data from an Access table to Sage Line 50
using VBA. It works fine, except that very occasionally one of the
fields contains a carriage return. If I step through my code in debug,
it handles the carriage return by replacing it with a square in the
middle of the text.

I need a way in Access of identifying the carriage return and
replacing it with a space. Is there a function I could use to do this?

I'm using Access 2003.

Thanks

Colin

  #2  
Old July 10th, 2007, 02:45 PM
Tom van Stiphout
Guest
 
Posts: n/a

re: Identifying carriage return in VBA


On Tue, 10 Jul 2007 13:28:13 -0000, Bobby <bobby2@blueyonder.co.uk>
wrote:

Consider using the Replace function for that.
-Tom.

Quote:
>Hi
>I'm trying to export some data from an Access table to Sage Line 50
>using VBA. It works fine, except that very occasionally one of the
>fields contains a carriage return. If I step through my code in debug,
>it handles the carriage return by replacing it with a square in the
>middle of the text.
>
>I need a way in Access of identifying the carriage return and
>replacing it with a space. Is there a function I could use to do this?
>
>I'm using Access 2003.
>
>Thanks
>
>Colin
  #3  
Old July 10th, 2007, 02:55 PM
Bobby
Guest
 
Posts: n/a

re: Identifying carriage return in VBA


On 10 Jul, 14:40, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
Quote:
On Tue, 10 Jul 2007 13:28:13 -0000, Bobby <bob...@blueyonder.co.uk>
wrote:
>
Consider using the Replace function for that.
-Tom.
>
>
>
Quote:
Hi
I'm trying to export some data from an Access table to Sage Line 50
using VBA. It works fine, except that very occasionally one of the
fields contains a carriage return. If I step through my code in debug,
it handles the carriage return by replacing it with a square in the
middle of the text.
>
Quote:
I need a way in Access of identifying the carriage return and
replacing it with a space. Is there a function I could use to do this?
>
Quote:
I'm using Access 2003.
>
Quote:
Thanks
>
Quote:
Colin- Hide quoted text -
>
- Show quoted text -
Thanks Tom,
Used in conjunction with vbCR and vbLF, Replace has worked fine,

Colin

Closed Thread