I need to find and replace text in a query. I am stumped.
The table contains all text fields I need to remove the "cr" that appears at the end. And then add a "1" at the begining of the text field
this is how I do it in excel
=IF(ISERROR(FIND("cr",G2,1)),IF(H2<>"",G2,""),(SUBSTITUTE(G2,"cr","")*-1))
I converted it over to MsAccess
IIf((InStr(1,[field8],"cr",0))>0,("-"+Replace([field8],"cr","")),[Field8])
All I get is [field8] with the "cr" removed and not the "1" added to the text.
What am I doing wrong ?
snippet of Field8
16.09
12.33
10.93cr
12.76
12.42
All I want is the chance to prove money won't make me happy.
The table contains all text fields I need to remove the "cr" that appears at the end. And then add a "1" at the begining of the text field
this is how I do it in excel
=IF(ISERROR(FIND("cr",G2,1)),IF(H2<>"",G2,""),(SUBSTITUTE(G2,"cr","")*-1))
I converted it over to MsAccess
IIf((InStr(1,[field8],"cr",0))>0,("-"+Replace([field8],"cr","")),[Field8])
All I get is [field8] with the "cr" removed and not the "1" added to the text.
What am I doing wrong ?
snippet of Field8
16.09
12.33
10.93cr
12.76
12.42
All I want is the chance to prove money won't make me happy.