>is there a Strtran function (or similar) which will replace text but in a case insensitive manner, e,g,
>
>Abc=Strtran(MyFruit,'Apples','Coca Cola')
>Abc=Strtran(MyFruit,'apples','Coca Cola')......
>
>otherwise I will need to put every possible combination of 'Apples' in using Upper and lower case
>
>I am using Strtran on a memo field, so it is not possible just to upper it first
The following not fully tested code will do it.
lcMemo = mymemo
lcSearchExpr = "Apple"
lcReplaceExpr = "Coca Cola"
lnPos = Atc(lcSearchExpr, lcMemo)
DO WHILE lnPos > 0
lcMemo = STUFF( lcMemo, lnPos, Len(lcSearchExpr), lcReplaceExpr )
lnPos = Atc(lcSearchExpr, lcMemo)
ENDDO
Make sure that lcReplaceExpr doesn't include lcSearchExpr otherwise it'll create endless loop.
--sb--