Excuse me guys! I hope I'm not mistaken... Nice to see your name again on the board John Ruff!
 
-----Original Message-----
From: AccessDevelopers@yahoogroups.com [mailto:[EMAIL PROTECTED]On Behalf Of John Ruff
Sent: Wednesday, October 12, 2005 11:10 PM
To: AccessDevelopers@yahoogroups.com
Subject: RE: [AccessDevelopers] phone number conversion

You can use the Replace function in Access (Access2000 and above)

 

PhoneNumber = Replace(PhoneNumber,”-“,””)

PhoneNumber = Replace(PhoneNumber,” “,””)

 

 

 

John V. RuffThe Eternal Optimist J

 

“Commit to the Lord whatever you do,

                and your plans will succeed.” Proverbs 16:3

 


From: AccessDevelopers@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jose Luis Mora Jr
Sent: Wednesday, October 12, 2005 10:11 AM
To: AccessDevelopers@yahoogroups.com
Subject: RE: [AccessDevelopers] phone number conversion

 

The only way that I could think of accomplishing this is by using the following functions:

InStr() – this function will find the first occurrence of a dash starting from the left side in your account number and return a number where the dash is located.

InStrRev – this will perform a similar function as InStr but will find the first occurrence of a dash starting from the right side of the account number.

Left() – this function will take the first x characters starting from the left of the account number.

Right() - this function will take the first x characters starting from the right side of the account number.

Mid() -  this function will take a set of characters and somewhere in the middle of the account number starting at a position you need and then take the following x character from that location.

 

You can see what these function do in more detail from the help files.


Hope this helps.

 

Jose

 

 

 

"When you come to a fork in the road, take it."

- Yogi Berra

 

-----Original Message-----
From: AccessDevelopers@yahoogroups.com [mailto:AccessDevelopers@yahoogroups.com] On Behalf Of teresaamc
Sent: Wednesday, October 12, 2005 12:28 PM
To: AccessDevelopers@yahoogroups.com
Subject: [AccessDevelopers] phone number conversion

 

I've got a list of account numbers that appear to be formatted with
dashes and spaces between the numbers. I need to convert these numbers
to a format without spaces or dashes. I've tried searching the
messages here and can't come up with any results. Does anyone have a
solution for me? Thanks!!!








Please zip all files prior to uploading to Files section.




SPONSORED LINKS
Microsoft access developer Microsoft access help Microsoft access database
Microsoft access training Microsoft access training course Microsoft access programming


YAHOO! GROUPS LINKS




Reply via email to