Access Update Query to replace values with other values

Field: Reject

I have data values that resemble the below format.
R0102447 / R0102448

I want to replace the " / " with a ",". I tried with the below code but it does not work.

UPDATE DSCNSkpiUpdate2 SET DSCNSkpiUpdate2.Rank = Replace(Rank," / ",",");

Open in new window

Any ideas how to fix this?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Robert ShermanOwnerCommented:
Something like this should work.  You may have to tweak it a bit to deal with spaces according to what you want the end field to look like:

UPDATE Table1 SET Table1.text1 = Left([text1],InStr([text1],"/")-1) & "," & Mid([text1],InStr([text1],"/")+1);

Open in new window

EDIT: Obviously, the [text1] field name should be replaced with the proper field name for you table.
Rey Obrero (Capricorn1)Commented:

UPDATE DSCNSkpiUpdate2 SET DSCNSkpiUpdate2.[Rank] = Replace(Replace([Rank]," ",""),"/","")

this means if "/" is present, replace with , and remove the space
ggodwinAuthor Commented:
Your code actually delected everything in the field.

Your code did the same as mine. It appears to work, but then the expected outcome to the tables never changes.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Rey Obrero (Capricorn1)Commented:
can you upload a copy of the db with the table in question.
ggodwinAuthor Commented:
Ok, I realized that I entered something into the code wrong and it appeared to work.
However, once it did execute it also removed some coma's that needed to stay in place.

Here is the db.

In the reject column i need these format to read as

Instead of any other format. I need to do this so that I can try and use the information you gave me yesterday.
Rey Obrero (Capricorn1)Commented:
where is the db?

<However, once it did execute it also removed some coma's that needed to stay in place.>

the code i posted will never do that..
ggodwinAuthor Commented:
I must not have uploaded before I posted.
Rey Obrero (Capricorn1)Commented:
copy and paste this query and run

UPDATE DSCNSKPIUPDATE2 SET DSCNSKPIUPDATE2.Reject = Replace(Replace([Reject]," ",""),"/",",");

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Robert ShermanOwnerCommented:
When you used my code, I suspect you might have missed renaming something which could have caused the field to be updated to empty.

At any rate, I'm a really old-school Access user... In my day, we didn't have such new-fangled functions as Replace.  :D  Occasionally, my brain decides to program like it's 1989...  Rey's method is the way to go, for sure!
ggodwinAuthor Commented:
Bingo. Worked perfectly.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.