Access to Word - Multiple records - Bookmark error (1 Viewer)

Allan

Registered User
Local time
Today, 02:10
Joined
Apr 28, 2001
Messages
42
Hi,

I am using Access and Word 2003.

I have a query listing a number of people [Witness] and a number of questions [Question] for each of those people.

Because I need the flexibility of a Word document I have created a mail merge document (based on MS KB Q294686) that uses the query to place a Witness name at the top of the page and then the list of questions for that person. When the name changes the process starts again on a new page with the next witness and the questions for that person.

The merge code is listed below. My problem is that although I get the desired result, at the top of the first page I get "Error! Bookmark not defined".

Can anyone tell me what is causing the error message. My skill level is low, self taught for home and small business use and mainly rely on forum seaches etc to provide the necessary code to make things work.


{ IF { MERGESEQ } = “1” “ {MERGEFIELD WITNESS }
“ “” }{SET Place1 {MERGEFIELD WITNESS }}
{IF { Place2 } <> {Place1 }”
………………………………………………..Page Break……………………………
{ MERGEFIELD WITNESS }

{MERGEFIELD QUESTION }” “ {MERGEFIELD QUESTION }” }{SET Place2
{ MERGEFIELD WITNESS }}

TIA
 

TjS

Registered User.
Local time
Today, 02:10
Joined
Jul 18, 2007
Messages
126
May i add another item to your post?

When using your example with the mergefields witness and question, suppose there is a category for the questions, and a witness has four questions and those four questions are categorized in two cagegories. How to make the mergeseq statement that the example would be as follows:

Witness 1
category a
question aaa
question bbb

category b
question xxx
question zzz
------page break----
Witness 2
category a
question aaa
question ccc

category g
question hhh
question iii

etcetera.....

(in the example allan wrote the witness 1 would have the four questions, then pagebreak, witness 2 with the four questions).

My problem is, in the example of the category, how to programm it in the word-code
 

TjS

Registered User.
Local time
Today, 02:10
Joined
Jul 18, 2007
Messages
126
Allan,

I think the answer to your problem is that probably the last sentence has no <<enter>> at the end. In case there is no last <<enter>>; the first record will give a problem.
 

TjS

Registered User.
Local time
Today, 02:10
Joined
Jul 18, 2007
Messages
126
I have found the solution for my problem.
Thanks the help everyone!:)
 

Users who are viewing this thread

Top Bottom