Strip characters from text control

detrie

Registered User.
Local time
Today, 12:41
Joined
Feb 9, 2006
Messages
113
Access 2000

Hi All,
I am using an email form that will send emails to others within a company.
The form has a txtSendTo field where the recipient’s name is entered. The form allows multiple recipients by inserting a comma.

I need to strip the @abcd.com from EACH recipient’s email address only leaving the user name in the event the @abcd.com is entered.

This is what I’ve tried on the Click event of my “btnSend” command. The problem is it deletes everything after the first “@” including the second recipient.

Me.txtSendTo= (Left([EmailAddress],InStr(1,[EmailAddress],'@')-1))


Thanks
Detrie
 
You can use the Replace function.
 
You can use my recursive getpart function to strip a string. Search for getpart on this forum.
 

Users who are viewing this thread

Back
Top Bottom