Replace Function help

MGAllen

Registered User.
Local time
Today, 02:18
Joined
Jun 30, 2012
Messages
11
Hi, I'm new to the forum and hoped I could get advice on how to make my Replace function work in Access 2010.

I'm trying to remove two statements in my colum and I can get one to remove but have difficulty (brain freeze) on how to make multipe. I do not know VBA only took a beginning Sql course - so I'm not an expert.

Worked - Degrees Awarded: Replace([Discipline #1],"Copy HS Diploma","-")

Does not work -
Degrees Awarded: Replace(Replace([Discipline #1],"Copy HS Diploma","-"), “GED”, “-“)

I'm HOPING there will be an uncomplicated solution - suggestions are greatly appreciated,

thanks - Mel
 
Hi and welcome to the forum

If you take a close look at the expression that does not work you will see that the quotes around GED and the last hyphen are different to the other quotes. Copy and paste into a word processor and you'll see better.

Anyway, just delete the wrong quotes (the curly ones) and re-type using the quotes on the keyboard (shift-2 on my keyboard). These curly quotes are really entirely different characters in the character set even though they look similar.

hth
Chris
 
Degrees Awarded: Replace(Replace([Discipline #1],"Copy HS Diploma","-"), “GED”, “-“)

Think, above should work.
Just check the enclosing quote marks for
..................................................................................................., “GED”, “-“)

Edit : I have done it again Stopher. Me & my typing speed.:mad:

Thanks
 
Well that will teach me!!!!!! I will need to start using notepad to draft queries instead of MS Word - it worked - thank you, thank you, thank you :)
 

Users who are viewing this thread

Back
Top Bottom