excluding area code

  • Thread starter Thread starter jennieiou
  • Start date Start date
J

jennieiou

I am making a report in access where I want the phone numbers to
appear, but not the area code.
What can I put in the criteria fieled of the query to make this happen?
 
Hi

I assume the numbers you want are always on the right hand side of the Phone
Number Field. If so creat a calcualted column and use this

This will get you the last 3 number from the right
ShortPhoneNumber: Right([PhoneNumberField],3)

This will get you the last 4 number from the right
ShortPhoneNumber: Right([PhoneNumberField],4)

This will get you the last 5 number from the right
ShortPhoneNumber: Right([PhoneNumberField],5)

Just change the last number to get the numbers you want. Of course change
the name of the "PhoneNumberField" to what it is in your query

Hope this helps
 
if the area number and phone number in the same field? If yes, you can
convert the field to string and use function left or right to cut the
characters u dont want.

select Right(CStr(Your_phone_field),5) from table

5 is the number os character i cut.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top