Does anyone know of a function in Access
2000 similar to the Foxpro STUFF
function. I want to replace certain text
within a portion string but leave
the rest as is.
Best to tell us what you'd want the function to do, specifically -- I, for
one, have no FoxPro experience and, thus, don't know what a function
"similar to the FoxPro STUFF" function would do.
If you want to replace some text characters with other text characters, you
should look at Help on the, not surprisingly, Replace function.
For maniuplating strings, looking at Help for the Left, Mid, and Right
functions would be good. To replace the three characters at character
postion 10 - 12 of a 15 character string variable called strOld with the
string in variable strNew, you could use:
strOld = Left$(strOld,9) & strNew & Right$(strOld,3)
strNew doesn't have to be exactly 3 characters, of course.
To obtain the three characters at that position before replacing them
strReplaced = Mid(strOld,10,3)
Larry Linson
Microsoft Access MVP