Copy and Paste a Group of Fields

N

News Groups

Using Access 2003 with Windows XP SP2. All is working well...

I have a typical "contacts" database with names, addresses, phone numbers
and email addresses. On a regular basis, my users copy and paste--field by
field--this contact info for a given record into a document or an email.

Is there a way to copy all of these fields at once? Or to display all of
these fields in a single formatted field (so the fields are displayed over
several lines) that can be copied and pasted?

Thanks for your thoughts.

John
 
J

John Vinson

Is there a way to copy all of these fields at once? Or to display all of
these fields in a single formatted field (so the fields are displayed over
several lines) that can be copied and pasted?

Either is possible. You can use a Word Mail Merge in a couple of
different ways, for example by using the Word mail merge wizard and
having it look to a Query of your table for its data; or, you can
write a Query with an expression such as

SELECT [FirstName] & " " & [LastName] & Chr(13) & Chr(10) & [Address]
& Chr(13) & Chr(10) & [City] & " " & [State] & " " & [Zip] AS TheText
FROM yourtable
WHERE <criteria>

to create a calculated field TheText containing three lines of your
data. Chr(13) is an ASCII carriage return, Chr(10) a Linefeed - the
combination, IN THAT ORDER, generates a new line in a text string.

John W. Vinson[MVP]
 
Top