473,398 Members | 2,404 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,398 software developers and data experts.

How to convert one string to another

On my table I have a memo type field "notes".
I want to convert the text. Whenever the word "John" mentioned, i want
it to be converted to "Bill".
For example.
If in one record "notes" says: "John went to school, and then John came
back" , it will be converted to "Bill went to school, and then Bill
came back.

Any idea how to do this?

Thanks,

galsaba

Nov 13 '05 #1
5 3655

"galsaba" <ga*****@aol.com> ha scritto nel messaggio
news:11**********************@g14g2000cwa.googlegr oups.com...
On my table I have a memo type field "notes".
I want to convert the text. Whenever the word "John" mentioned, i want
it to be converted to "Bill".
For example.
If in one record "notes" says: "John went to school, and then John came
back" , it will be converted to "Bill went to school, and then Bill
came back.

Any idea how to do this?

Thanks,

galsaba


Hello,
use the function Replace ( documentation by help...) how in this example

Replace (notes, "John","Bill")

ok?

Good Night

Nov 13 '05 #2
Great!
Thanks!!

Nov 13 '05 #3
Great!
Thanks!!

Nov 13 '05 #4
I just found out this this function exists in access xp but not in
access 2000. Any solution?

Nov 13 '05 #5
It exisits in Access2000 but can't be used in queries.

Wrapping it in your own function should work e.g.

Public Function MyReplace( _
Expression As String, _
Find As String, _
Replace As String, _
Optional Start As Long = 1, _
Optional Count As Long = -1, _
Optional Compare As VbCompareMethod = vbBinaryCompare) As String

MyReplace = VBA.Replace(Expression, Find, Replace, Start, Count, Compare)

End Function

Which in your example becomes
MyReplace([notes], "John", "Bill")

"galsaba" <ga*****@aol.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
I just found out this this function exists in access xp but not in
access 2000. Any solution?

Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: simon | last post by:
I have datetime variable: Datetime tsEndTime; Should I use (DateTime): tsEndTime=(DateTime)rdr.GetValue(15) or is better to use: tsEndTime=Convert.ToDateTime(rdr.GetValue(15))
2
by: Joebloggs | last post by:
Hi I am trying to do an ldap lookup. I can pick up the domain name in the standard format DOMAIN\USERNAME. The problem is the company I work for expects the query in the format DOMAIN:USERNAME....
3
by: Jan Eliasen | last post by:
Hi I have a string, which I must convert into another string and have it utf-8 encoded. My current code looks like this; Both vDataIn and vDataOut are Objects (parameters to a...
4
by: simonZ | last post by:
Why this don't work: Boolean test; String testValue; testValue="0"; test=System.Convert.ToBoolean(testValue); How can I convert string to boolean?
3
by: GM | last post by:
Dear all, Could you all give me some guide on how to convert my big5 string to unicode using python? I already knew that I might use cjkcodecs or python 2.4 but I still don't have idea on what...
7
by: elliotng.ee | last post by:
I have a text file that contains a header 32-bit binary. For example, the text file could be: %%This is the input text %%test.txt Date: Tue Dec 26 14:03:35 2006...
1
by: neeraj | last post by:
Hi All Can any give me the code for convert "DataColumn" data type of "DataTable". Even if data table already populated (have data) Actually I am creating one search module which searches the...
8
by: =?Utf-8?B?d2lubGlu?= | last post by:
Hello Everything in .Net is an object and CTYPE converts one datatype to another datatype so why use Cstr, Cint or any other method to convert from one datatype to another?
4
by: tshad | last post by:
I am trying to convert a string character to an int where the string is all numbers. I tried: int test; string stemp = "5"; test = Convert.ToInt32(stemp); But test is equal to 53.
9
by: Marco Nef | last post by:
Hi there I'm looking for a template class that converts the template argument to a string, so something like the following should work: Convert<float>::Get() == "float"; Convert<3>::Get() ==...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.