Connecting Tech Pros Worldwide Help | Site Map

Identifying carriage return in VBA

Bobby
Guest
 
Posts: n/a
#1: Jul 10 '07
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

Tom van Stiphout
Guest
 
Posts: n/a
#2: Jul 10 '07

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
Bobby
Guest
 
Posts: n/a
#3: Jul 10 '07

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


Similar Microsoft Access / VBA bytes