Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deleting parts of a string contained in a value of a field

Status
Not open for further replies.

jaydy

MIS
Nov 9, 2003
27
PH
hi!

i made one field in my table, wherein the data entry form could take in more than one value at one time and the code would just simply append or concatenate to the content of the field.

since i just concatenated, is there anyway for me to reverse this? meaning if i wanted to erase that certain value/string that i earlier added or concatenated, can i do this?

in short, how do i search through a string contained in a value of a field and particularly pick out the part which i want to delete? is this possible?

thanks
 
Take a look at the InStr function.
Depending of your access version, you may also consider the Replace function.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
misa03

In addition to PHV info on INSTR, other useful functions for string manipulation include...
RIGHT
LEFT
MID
LEN

The INSTR will find the location of the target string. The other allow you to manipulate the string.

For example,

MyNewString = RIGHT(MyOldString,6)
... grabs the last 6 charcters of a string.

Richard
 
Also maybe the OldValue property if you can use it.

C
 
yes, i have tried the functions right and left, but the InStr was the exact function is was looking for...thanks all!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top