F
faxylady
I am trying to update some area codes and want to use the Left function.
What I want is simply to be able to identify the area code so that it may be
deleted, used in a make table query, etc. According to Special Edition Using
Access 2000, by Roger Jennings, page 335, the following should work:
Left ("phone",3)=999
However, when I try to use this in an Update query in the criteria row, the
following message is returned to me. The Expression you entered has a
function containing the wrong number of arguments.
Also, I have found that when I actually update a phone number with an area
code change and I use the following, I don't have any problems.
In the Update row: 777&right([phone],8)
the area code is updated to 777 just fine. 8 has to be used because most of
the phone numbers are formated with a dash between the exchange and last four
digits. Notice the ampersand after 777.
What I am also trying to do is isolate area codes in this way:
Left ("phone",3)=999,222,555. These are several area codes in one
metropolitan area.
What is the correct code to use so that I won't receive these syntax errors?
Then I can do a make table query of the isolated area codes or a delete
query or if necessary, an update query.
What I want is simply to be able to identify the area code so that it may be
deleted, used in a make table query, etc. According to Special Edition Using
Access 2000, by Roger Jennings, page 335, the following should work:
Left ("phone",3)=999
However, when I try to use this in an Update query in the criteria row, the
following message is returned to me. The Expression you entered has a
function containing the wrong number of arguments.
Also, I have found that when I actually update a phone number with an area
code change and I use the following, I don't have any problems.
In the Update row: 777&right([phone],8)
the area code is updated to 777 just fine. 8 has to be used because most of
the phone numbers are formated with a dash between the exchange and last four
digits. Notice the ampersand after 777.
What I am also trying to do is isolate area codes in this way:
Left ("phone",3)=999,222,555. These are several area codes in one
metropolitan area.
What is the correct code to use so that I won't receive these syntax errors?
Then I can do a make table query of the isolated area codes or a delete
query or if necessary, an update query.