A few questions/clarification requests:
a. Which version of Word?
b. Your second document uses the first document as its data source? (I just
want to be sure I understood)
c. You are setting some criteria in the second document to select the staff
who've been there for 6 years or more, then merging to a new directory, then
changing the criteria to 3 years or less, doing another merge, then changing
the criteria and merging again, etc.?
if so,
d. does it make any difference which sequence you do the reports (i.e. it
is always the first one that works?)
e. if you save close the mail merge main document without saving after
merge, then open it again and apply the criteria for the next merge, then
merge, does that work as it should?
(I haven't tried to replicate this yet, but if (e) works at least it gets
you a bit further)
Peter Jamieson
> Hi all
>
[quoted text clipped - 15 lines]
>
> Louise
Louise - 14 Feb 2006 11:23 GMT
Peter
a. Word XP and Word 2003 (tried it on various PC's)
b. Yes, the first document is the data source, this contains the names,
addresses etc.
c. Yes
d. No, it doesn't make any difference which order the reports are created
in. It's always the first one that works.
e. No I haven't tried this but will give it a go.
The problem is, I am an IT Trainer and am showing this particular subject to
a group of people and we all experienced the same problem. Not very good!!
THank you very much.
Louise
> A few questions/clarification requests:
> a. Which version of Word?
[quoted text clipped - 36 lines]
> >
> > Louise
Peter Jamieson - 14 Feb 2006 12:06 GMT
> The problem is, I am an IT Trainer and am showing this particular subject
> to
> a group of people and we all experienced the same problem. Not very
> good!!
Always a problem!
I have tried to replicate this on Word 2003/Win XP, but have not been able
to get Word to fail so far. However, my sample data is very simple and may
be too simple - if you can Despam my e-mail address and send me
a. the data file
b. the mail merge main document
c. some hints about the criteria you are using and how you are setting them
up (In the advanced options?)
it may help. (But NB, I'll be offline for a few days soon).
Peter Jamieson
> Peter
>
[quoted text clipped - 63 lines]
>> >
>> > Louise
Louise - 14 Feb 2006 12:26 GMT
Peter
That would be great. (I can't find your e-mail address for me to de-spam??)
> > The problem is, I am an IT Trainer and am showing this particular subject
> > to
[quoted text clipped - 81 lines]
> >> >
> >> > Louise
Peter Jamieson - 14 Feb 2006 16:30 GMT
try pjj@pjjnet.demon.co.uk
> Peter
>
[quoted text clipped - 102 lines]
>> >> >
>> >> > Louise
Louise - 14 Feb 2006 16:42 GMT
The e-mail is on its way to you.
Thanks again.
Louise
> try pjj@pjjnet.demon.co.uk
> > Peter
[quoted text clipped - 103 lines]
> >> >> >
> >> >> > Louise
Peter Jamieson - 15 Feb 2006 09:50 GMT
OK, for the benefit of other readers, the problem appears to be to do with
the SQL that Word generates when the user specifies merge criteria.
With Word 2003 (possibly also 2002) and a using a Word document as a data
source (possibly also other types of data source)...
If the user goes into Mail Merge Recipients, clicks one of the column
headings, chooses "Advanced" to go into the Query Options dialog, and enters
(say)
myfield greater than or equal to 5
Word generates
SELECT * FROM datasource.doc WHERE (( myfield >= '5' ))
i.e. it is doing a text comparison, so if myfield is '11', the record will
be excluded. The SQL should be
SELECT * FROM datasource.doc WHERE (( myfield >= 5 ))
However, it's slightly more complicated than that because Word gets the SQL
right the first time you specify the condition, but not when you specify the
condition immediately after you have just merged. i.e., merge, switch back
to the main document, go and set the criterion, Word gets it wrong. But go
and set the criterion again before you merge, and Word gets it right again.
Incidentally, this occurs whether you go into the Query Options dialog from
Mail merge Recipients or from the old Mail Merge Helper.
Peter Jamieson
> The e-mail is on its way to you.
>
[quoted text clipped - 115 lines]
>> >> >> >
>> >> >> > Louise