This page uses high res images for clarity, and may take some time to load.
![]()
On June 7th 1999 all London telephone numbers will change so 0171 xxx xxxx will become 020 7xxx xxxx, 0181 xxx xxxx will become 020 8xxx xxxx. Click here for BT's website on code and number changes.
Below is an example of a query you could use to update your telephone or fax fields in an Microsoft Access database.
In
this example we will be using a small table called "phone" with the
fields ID, FullName & Telephone.
The table should look something like this (the telephone numbers have been generated
at random).
We
could construct an query to automatically update the numbers to the new format.
Open a new query in Design view, and then choose update from the query menu.
Add the telephone field to the query grid. In my example I have limited changes only to those numbers which have the form: 0171 xxx xxxx or 0181 xxx xxxx. This means that numbers not in this format will be unaffected. (E.g. "xxx xxxx" or "0171 xxx xxxx Ex 1234" will not be changed). In the criteria grid we can enter:
Like "0181 ??? ????" Or Like "0171 ??? ????"
The formula for the update to box is:
IIf((Mid([Telephone],3,1)=7),("020 7" &(Right([telephone],8))),("020 8" &(Right([telephone],8))))
The
query looks like this:
In order to update, you simply run the query. (Don't forget to backup first)
After Running
the query the table looks like this:
You can download an example database containing this query, click here (17KB)
![]()