Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using the RIGHT / FIND function in Access Query 1

Status
Not open for further replies.

RandDUser

Technical User
Feb 24, 2005
65
US
I have a field in an Access 2000 query that are email addresses. I am trying to define another field in the query to return the text after the '@'. Here is what I wrote...

Email Provider: Right([EMAIL_ADDR],Len(([EMAIL_ADDR])-FIND("@",[EMAIL_ADDR])))

The problem is that Access does not recongnize the FIND function.

Any suggestions?

Thank you!
 
I think you need InStr:
Right([EMAIL_ADDR], Len([EMAIL_ADDR]) - InStr([EMAIL_ADDR], "@"))

 
A simpler way:
Email Provider: Mid([EMAIL_ADDR], 1+InStr([EMAIL_ADDR],'@'))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top