Selecting records with email addresses

M

Melih

hello everyone,

sometime ago we had notes on this, but are unable to locate them. We have a
file with a lot of garbage in it. All we want to do is select the records
that have email addresses only.

There is a way to setup the selection criteria in a "make table" query so
that it finds the "@'" symbol and then goes to the left and right until it
finds a "space". It has not identified the email address to add to the new
table.

Anyone have the details on how to create this selection criteria?

Thanks for your help.
 
J

John Spencer (MVP)

Find the @
X = InStr(1,SomeField,"@")

Find the following space
Instr(InStr(1,SomeField,"@"),Somefield," ")

Combined to get the trailing part from @ onward
Mid(SomeField,InStr(1,SomeField,"@"),Instr(InStr(1,SomeField,"@"),Somefield,"
") - Instr(InStr(1,SomeField,"@"),Somefield," "))

Use InstrRev in a similar manner to get the leading section.
 
Top