473,386 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Evaluate a String for a Machine Readable Value and Replace w/ VBCRLF

Hi, seriously sophomoric question here! TIA for any help.

The text below is representative of text I imported from a large excel spreadsheet. In an Access Memo field, the "Line Feeds" are not respected. the text prints out contiguously with a bazarre "machine" character instead of a line feed. I need to replace that value wherever it exists with something that will cause Access to format the text as it appears below. Thanks!

The values are:
1- Value 1
2- Value 2
3- Value 3
May 6 '11 #1

✓ answered by ADezii

You would need to Replace all occurrences of that Character with a CR/LF:
  1. TAB Delimited String assigned to txtTest:
    Expand|Select|Wrap|Line Numbers
    1. Me![txtTest] = "She sells" & vbTab & "sea shells" & vbTab & "at the sea shore"
  2. String as displayed:
    Expand|Select|Wrap|Line Numbers
    1. She sells    sea shells    at the sea shore
  3. Replace TABs with CR/LFs:
    Expand|Select|Wrap|Line Numbers
    1. Debug.Print Replace(Me![txtTest], vbTab, vbCrLf)
  4. New String:
    Expand|Select|Wrap|Line Numbers
    1. She sells
    2. sea shells
    3. at the sea shore
    4.  

2 2069
ADezii
8,834 Expert 8TB
You would need to Replace all occurrences of that Character with a CR/LF:
  1. TAB Delimited String assigned to txtTest:
    Expand|Select|Wrap|Line Numbers
    1. Me![txtTest] = "She sells" & vbTab & "sea shells" & vbTab & "at the sea shore"
  2. String as displayed:
    Expand|Select|Wrap|Line Numbers
    1. She sells    sea shells    at the sea shore
  3. Replace TABs with CR/LFs:
    Expand|Select|Wrap|Line Numbers
    1. Debug.Print Replace(Me![txtTest], vbTab, vbCrLf)
  4. New String:
    Expand|Select|Wrap|Line Numbers
    1. She sells
    2. sea shells
    3. at the sea shore
    4.  
May 6 '11 #2
Great answer! Thank you! this information will be helpful with me in other fashions as I need to do some data formatting after import to access.
May 6 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: J. van Herten | last post by:
I am searching for the replacement of the scriptcontrol of VB6 in .NET. I am plaing with the CodeDOM but I cannot get to evaluate a string text to the result I want. String text = "1 + 2"...
1
by: ABC | last post by:
How to convert a date string to datetime value with custom date format? e.g. Date String Date Format Result (DateTime value) "05/07/2004" "MM/dd/yyyy" May 7, 2004 "01062005" ...
2
by: Kamal Ahmed | last post by:
Hi all, I want to execute a String that is generated at Runtime and fills data in DropDownList Controls at Runtime. I want to do this at server side. As Eval functions works as client side...
1
by: abcabcabc | last post by:
I write an application which can let user define own date format to input, How to convert the date string to date value with end-user defined date format? Example, User Defined Date Format as...
8
by: No Such Luck | last post by:
Is there anyway to literally evaluate the contents of a string in an if statement? For example: int i = 0; char * str = "i == 0"; if(str) /* I know this doesn't do what I want */ {
4
by: netnet | last post by:
Is it possible to evaluate a string as a method name? Something like this: Session = "loadFormFormACompany"; This is what I would like to do.... eval(Session+"()") Anyone have any ideas?
14
by: Aman JIANG | last post by:
hi i need a fast way to do lots of conversion that between string and numerical value(integer, float, double...), and boost::lexical_cast is useless, because it runs for a long time, (about 60...
6
by: peace2007 | last post by:
Hi, I need to evaluate the return result of a function from Server.aspx as following. But it doesn't work as I need function getAjax() { var XmlHttp; //Creating object of XMLHTTP...
7
by: David C | last post by:
We have an asp.net page that displays data from a SQL table that is updated from a VB application. That application uses vbCrLf to denote line breaks. How can I replace them with "<br />" before...
13
by: Hongyu | last post by:
Hi, I have a datetime char string returned from ctime_r, and it is in the format like ""Wed Jun 30 21:49:08 1993\n\0", which has 26 chars including the last terminate char '\0', and i would...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.