I desire to put together a mail merge that lists all the classes a student
takes. The classes are produced from an Access Query and each row consists
of a single class. The list will ultimately be emailed to their advisor
(which is why I'm not using an Access report). I am using "Next Record If"
to get the list of classes. It works if I hard code a Bookmark with the
actual student ID. But I can't figure out how to set the variable from the
database.
Peter Jamieson - 23 Jan 2006 09:54 GMT
If you have field StudentID in the list of fields in your mail merge data
source and you want to store it in a bookmark called myID, use
{ SET myID { MERGEFIELD StudentID } }
where the fields are nested, i.e. both pairs of {} are the special field
codes you can insert using ctrl-F9
If you need to set an initial value at the stqart of the merge, you can use
something like
{ IF { MERGESEQ } = 1 "{ SET myID "" }" "" }
Peter Jamieson
>I desire to put together a mail merge that lists all the classes a student
> takes. The classes are produced from an Access Query and each row
[quoted text clipped - 5 lines]
> actual student ID. But I can't figure out how to set the variable from the
> database.
grandpa_potts - 04 Feb 2006 18:02 GMT
Have you considered a cross-tab query? I run into this problem often (as I
am an advisor for graduate students). I setup a hidden cross tab query that
does the calculation, and then base a select query off of the cross tab query
in order to complete the merge. Just a thought.
> I desire to put together a mail merge that lists all the classes a student
> takes. The classes are produced from an Access Query and each row consists
[quoted text clipped - 3 lines]
> actual student ID. But I can't figure out how to set the variable from the
> database.