Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Help with update expression (Access XP)

    I need an update query to update the (717)999-1234 of a phone number to (021)999-1234. I will be running this regularly. Is it better to use a macro that runs a find / replace or is there an expression that will extract (717) and make it (021) leaving the rest of the ph. number as is?

    TX
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Help with update expression (Access XP)

    You can create an update query. Say that your field is named Phone. enter the following expression in the Update to line in the Phone column:
    <code>
    Replace([Phone],"(717)","(021)")
    </code>
    Note: this will only work in Access 2002 and higher. In Access 2000, Replace couldn't be used in expressions (and in Access 97, the Replace function didn't exist yet).

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Help with update expression (Access XP)

    wow....tx for this expression....cheers
    Regards,
    Rudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •