Re: Update Query combine two functions

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



That did it - thanks so much!

"John W. Vinson/MVP" wrote:

On Thu, 17 Jul 2008 22:22:01 -0700, Darmahart
<Darmahart@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Is there a way to combine two functions in the Update To box for one field?
I'm trying to use Replace() to get rid of two excess strings of duplicate
letters. If there is another function(I can't use code) that can get rid of a
string of 3 of the same consecutive letters that would also work.

Thanks in advance

You can pass a function call as an argument to a function call. for
instance, to use Replace to remove parentheses, hyphens and blanks
from a phone number - to turn (800) 555-5555 into 8005555555 - you can
use Replace(Replace(Replace(Replace([Phone], "(", ""), ")", ""), "-",
""), " ", "")

or, more readably,

Replace(
Replace(
Replace(
Replace(
[Phone], "(", "")
, ")", ""),
, "-", "")
, " ", "")

--

John W. Vinson/MVP

.



Relevant Pages

  • Re: Update Query combine two functions
    ... I'm trying to use Replaceto get rid of two excess strings of duplicate ... string of 3 of the same consecutive letters that would also work. ...
    (microsoft.public.access.queries)
  • Re: New Joao Pires
    ... Rugby appears to have caused the following letters ... Double sheesh! ... I've been steadily getting rid of those for a while now. ... Recently I bought ...
    (rec.music.classical.recordings)
  • Re: Ehnes Elgar Concerto
    ... Rugby appears to have caused the following letters to ... Both of his recordings mangle the work beyond ... I had Nigel Al-Kennedy's two recordings of the work, ... I got rid of the one recording I had by Emma Al-Kirkby. ...
    (rec.music.classical.recordings)
  • Re: Sony BMG Plans to Drop DRM
    ... Steve de Mena appears to have caused the following ... following letters to be typed in ... The article says Sony BMG "will make at least part of its collection ... They'll get rid of it completely. ...
    (rec.music.classical.recordings)