Use a memo field to store the text, with a special way of indicating the
value to be inserted. Then use the Replace() function to replace the text
with the value of the field.
Say:
- Your Customer table has a text field named FirstName
- Your Letter table has a memo field named TheLetter.
- You use braces around the field name as the way to indicate the value
to
be inserted, so the memo field might contain this:
Thank you, {FirstName}, for your donation.
As the source for your report, you create a query containing both tables,
so
both fields are in the report. Now in the report, your text box has its
Control Source set to:
=Replace([TheLetter], "{FirstName}", [FirstName])
When you run the report, the Replace() function finds all instances of
the
literal text in the memo field, and replaces it with the value of the
FirstName field.
If you have several of these fields to substitute, you probably want to
write a function that uses Replace() for each one to drop in the right
text.
message
What I need to do is make a report that has a few paragraphs of text
with
a
data field inserted in certain places here and there. All I can come up
with
is either use labels or make a field in a table and store the text
there
and
then put the field on the report. Neither of these solutions seem very
good
to me. any ideas of a good way to do this?