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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quering Email Address 1

Status
Not open for further replies.

SpeedStick

Technical User
May 24, 2007
37
US
I am trying to develop a query which only pulls the domain name for email address. I want to only display the information between the @ symbol and .com for an email address. What is the best way to do that? I thought by putting this in the criteria section Like "@*", it would work. It does not.
 
Code:
 Left(Mid([EmailAddress], InStr([EmailAddress], "@") + 1), InStr(Mid([EmailAddress], InStr([EmailAddress], "@") + 1), ".") - 1)
 
Thank you for your post. I tried to use the code above in a query and I got an error message. "Data type mismatch in criteria expression."
 
this is not to be put in the criteria line!

Put this in the field line
 
Thank you! That did work. I really do appreciate your help in this matter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top