syntax for the "replace" statement?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to replace a "*" that is inbedded within a text field. this
field sometimes is populated and sometime is blank. When the field is
populated this field contains the first name followed by an "*" then Last
name.
My Goal is to replace this "*" with space " ".
I tried doing the following:

IIf([AssignedOwnerName]>" ',REPLACE([AssignedOwnerName],"*",1,1," ")) as per
the given statement on the MS Help Menu, but I keep getting an "Undefined
function REPLACE in expression..

Can some one help me pleaseee???
 
IIf([AssignedOwnerName]>" ',REPLACE([AssignedOwnerName],"*",1,1," "))

In the test part, you have a mix of single and double quotes, this may just
be a typo in the message. You also appear to have the arguments out of
order. Judging from what you have I believe the Replace part should be:

REPLACE([AssignedOwnerName],"*", " ",1,1)
 
I think I chose the wrong button before.. Thank you Ofer for your fast
response.. Everything worked perfectly. God Bless you.

Ofer said:
Try that, the order wasn't right

REPLACE( [AssignedOwnerName], "*"," ",1,1)

eposada said:
I am trying to replace a "*" that is inbedded within a text field. this
field sometimes is populated and sometime is blank. When the field is
populated this field contains the first name followed by an "*" then Last
name.
My Goal is to replace this "*" with space " ".
I tried doing the following:

IIf([AssignedOwnerName]>" ',REPLACE([AssignedOwnerName],"*",1,1," ")) as per
the given statement on the MS Help Menu, but I keep getting an "Undefined
function REPLACE in expression..

Can some one help me pleaseee???
 
Back
Top