Connecting Tech Pros Worldwide Help | Site Map

Line Returns

  #1  
Old November 12th, 2005, 06:17 PM
Steve
Guest
 
Posts: n/a
I have a form with 28 fields; 4 are comboboxes, 23 are textboxes and 1 is a memo
field. Some fields may be left blank when entering a new record. After one or
more new records are created, the TransferText method is used to create a pipe
delimited text file from the new record(s) in the table. A line return in any
field causes a problem for the final use of the text file. I need
recommendations on how to check for line returns and when and where is the best
time and place to check.

Thanks!

Steve


  #2  
Old November 12th, 2005, 06:17 PM
Ron Weiner
Guest
 
Posts: n/a

re: Line Returns


If you are using access 2000 or greater you can use the VBA Replace()
function for each field.

Replace (strToTest, vbCrLf," " ) will remove all of the CrLf's from the
string to test and replace them with a single space.

Where to do it is up to you. Since the CrLf's have no impact on access
Text or Memo fields I would probably remove them in the query I used for
TransferText.

Ron W
"Steve" <spam@nospam.spam> wrote in message
news:NVcHb.11276$IM3.5503@newsread3.news.atl.earth link.net...[color=blue]
> I have a form with 28 fields; 4 are comboboxes, 23 are textboxes and 1 is[/color]
a memo[color=blue]
> field. Some fields may be left blank when entering a new record. After one[/color]
or[color=blue]
> more new records are created, the TransferText method is used to create a[/color]
pipe[color=blue]
> delimited text file from the new record(s) in the table. A line return in[/color]
any[color=blue]
> field causes a problem for the final use of the text file. I need
> recommendations on how to check for line returns and when and where is the[/color]
best[color=blue]
> time and place to check.
>
> Thanks!
>
> Steve
>
>[/color]


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
what malloc(0) should returns? quiberon2@yahoo.com answers 82 December 26th, 2006 01:45 AM
Scanner class and last line in a file DemonWasp answers 7 September 25th, 2006 07:45 PM
Type.GetType returns null for Systems.Windows.Forms.TextBox Nabeel Moeen answers 2 February 12th, 2006 01:35 PM
problem: ds.Tables ["xx"].Columns ["xx"] always returns null Brian answers 8 November 16th, 2005 05:04 AM