View Full Version : Remove area code from phone field


geno
10-10-2001, 11:09 AM
Hi, I have two tables, one has a phone field with an area code ie: 2505498876, the other's phone field is ie: 5498876. I need to run a query on the matching phone fields. I've tried to remove the leading characters from the first table with an update query. The function I used is: Mid([Phone],4,Len([Phone])). When I run this I get an error: Undefined function "Mid" in expression. I have used this function before without any errors. Any ideas?

jwindon
10-10-2001, 02:32 PM
I have had my functions stop working before also. They worked once or twice and for no apparent reason, STOPPED working. I have never resolved the reason. I will suggest maybe trying Right([PhoneNumber],7) to get the phone number. That will get the same results. Hopefully, there is not something going on with your Left & Right functions.

geno
10-10-2001, 03:11 PM
Thanks for the tip, I had to open up a blank database and import the tables, queries, etc.
Now the mid function works.