Trim Email Address

F

FrankM

OK, this may seem a bit bizarre but here goes ...

I have a Table and one of the fields is EMail address. I have a Query that
links a couple different fields and has some various criteria (no big deal,
really).

The Query is exported periodically to Excel and sent to a couple different
people.

One person asked if an additional field could be added to the Excel
spreadsheet and this field contain ONLY the domain part of the the EMail
address.

I'm guessing this could probably be done in either Excel or Access and I'm
choosing to attempt it with Access.

I would like to add the EMail field a second time to the Query but this time
enter some sort of forumla to Trim everything left of the "@" symbol.

I'm having a difficult time. Anyone have any auggestions?

Thank you.
 
A

Allen Browne

Use Instr() to locate the "@", and Mid() to pick up the remainder of the
value.
 
F

FrankM

OK, maybe I thanked you too quickly. I thought I could take that information
and run with it however I ran into a snag or two I can see that with the
instr() I need to specify additional information. Should I use a FIND command
to locate to "@" symbol? Would the MID command go in the Compare arguement? I
guess I overestimated what I was going to be able to do with what you
suggested. Can you provide any additional information or provide an example?
 
F

FrankM

Ah, ha !

It pays off to keep at it ...

EMail Domain: Mid(
.[Email Field],InStr(
.[Email Field],"@")+1)

IT WORKS! IT WORKS I TELL YA! IT WORKS!
 
Top