By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,399 Members | 1,028 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,399 IT Pros & Developers. It's quick & easy.

How to extract domain information from e-mail address table?

P: 2
Access 2000 (9.0.3821 SR-1) / Windows XP Pro

Hi All,

Apologies for the newbie question.

I am trying to use a simple Query to put a list of e-mail addresses in domain name order (ascending alphabetically) but cannot find a way of extracting only the domain information after the @ character in the complete address string. Of course, the addresses in the source table are of different lengths and so the position of the @ character varies.

Any help much appreciated.

TIA

Howard.
Dec 5 '07 #1
Share this Question
Share on Google+
3 Replies


Denburt
Expert 100+
P: 1,356
I am currently working on issues with an office upgrade so I am typing this off the cuff so to speak.
Place this in the field name location of the query

In VBA coding window:
debug.print Right("lol@Test.com", Len("lol@Test.com") - InStr("lol@Test.com", "@"))

or in the query...

myDomain:Right(FieldName, Len(FieldName) - InStr(FieldName,"@"))
Dec 5 '07 #2

P: 2
Thanks very much for such a speedy and helpful response, it worked a treat.

Regards,

Howard.
Dec 5 '07 #3

Denburt
Expert 100+
P: 1,356
Your quite welcome, i'm glad I could help.
Dec 5 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.