Connecting Tech Pros Worldwide Help | Site Map

Identifying carriage return in VBA

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 10th, 2007, 01:35 PM
Bobby
Guest
 
Posts: n/a
Default Identifying carriage return in VBA

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, 01:45 PM
Tom van Stiphout
Guest
 
Posts: n/a
Default 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, 01:55 PM
Bobby
Guest
 
Posts: n/a
Default 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

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.