How do I print several rows on one merge document

C

cbictech

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.
 
P

Peter Jamieson

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
 
G

grandpa_potts

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.
 

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