Adding a word to all fields

K

kateri4482

I imported a large excel spreadsheet into an access database and one of the
fields is an e-mail address. But the forms of the e-mail addresses are all
different. Some have one word before the @, some have a word, then a period,
then a word before the @, etc. I need to be able to add "mailto" in front of
all of these different e-mail addresses so that in a form a user can click on
that field and outlook will open automatically. I have it so that all new
e-mail addresses will add "mailto" automatically, but I would hate to have to
fix all of these manually. Any thoughts?
 
J

John Spencer

Use an update query.

Warning: Backup your data before you do this. You cannot UNDO the changes.



UPDATE YourTable
SET yourField = "Mail To: " & [Yourtable].[Yourfield]
WHERE YourField not like "Mail To*"

If you can't construct a query without using the query grid.
--Open a new query
--Add your table
--Add your email field
-- set the criteria to
Not Like "Mail To*"
--Select Query: Update from the menu
-- Type the following (replace table and field name with your table and
field names)in the update to "cell"
"Mail To: " & [Yourtable].[Yourfield]
-- SELECT Query: Run from the menu


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
K

kateri4482

Excellent! Thank you - that is exactly what I was looking for.

Steve said:
Use an update query and put the following expression where it says Update
To:
"MailTo:] & [Email Address]

Where [Email Address] is the name of your email address field.

Steve



kateri4482 said:
I imported a large excel spreadsheet into an access database and one of the
fields is an e-mail address. But the forms of the e-mail addresses are
all
different. Some have one word before the @, some have a word, then a
period,
then a word before the @, etc. I need to be able to add "mailto" in front
of
all of these different e-mail addresses so that in a form a user can click
on
that field and outlook will open automatically. I have it so that all new
e-mail addresses will add "mailto" automatically, but I would hate to have
to
fix all of these manually. Any thoughts?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top