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

Help: Adding Email address to field 1

Status
Not open for further replies.

RDMRDM

Programmer
Apr 9, 2007
33
US
I have a field in a table with just the first part of the email address. Such as JohnDoe I need to add the @email.com to this field. Wondering how I would write this to include the @email.com so the new field would read JohnDoe@email.com I am guessing I would do this in a query. Thanks in Advance for any help.
 
is the @email.com part different for each email address ?

Hope this helps!

Regards

BuilderSpec
 
No, all email address will have the same @email.com address at the end. Thanks.
 
Then why bother adding it ?

When you need to use the email address just use code like :

Dim FullEmail as string

FullEmail = Me.txtEmailFromDB + "@email.com"

dim mi as mailitem
mi.To = FullEmail


Above might not be syntactically correct but you get the meaning hopefully.


Hope this helps!

Regards

BuilderSpec
 
Bit confused. Sorry. Would I add this in the query or to a separate field in a table? If so, where specifically would I add this? Thanks, and sorry for my confusion. Appreciate the help.
 
As you asked for a query, here a starting point (SQL code):
UPDATE yourTable
SET yourField = Trim([yourField]) & '@email.com'
WHERE yourField Not Like '*@*'

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