> Thanks, this sounds good. Now one more question - how do I do this if I
> want to say 'don't print this field if it contains the word "blank" '
I looked at doing it in the select but this will delete the records
having the word 'blank'. I'm not sure how to say that I want to keep
the record but clear the field for this merge. Any thoughts?
Peter Jamieson - 28 Mar 2006 19:55 GMT
You could use an expression in the SELECT to create another field, e.g. in
Jet SQL, something like
SELECT iif(instr(myfield,'blank',1) = 0, myfield, '') AS 'mynewfield', *
FROM ....
(My syntax probably isn't quite right there)
Peter Jamieson
>I looked at doing it in the select but this will delete the records
> having the word 'blank'. I'm not sure how to say that I want to keep
> the record but clear the field for this merge. Any thoughts?
Peter Jamieson - 28 Mar 2006 19:59 GMT
You could use an expression in the SELECT to create another field, e.g. in
Jet SQL, something like
SELECT iif(instr(myfield,'blank',1) = 0, myfield, '') AS 'mynewfield', *
FROM ....
(My syntax probably isn't quite right there)
Peter Jamieson
>I looked at doing it in the select but this will delete the records
> having the word 'blank'. I'm not sure how to say that I want to keep
> the record but clear the field for this merge. Any thoughts?
Graham Mayor - 29 Mar 2006 06:43 GMT
Can we clarify what is in this field? Does it contain just the word 'blank'
or does it contain 'blank' and some other text?
Are you merging just that field?

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> I looked at doing it in the select but this will delete the records
> having the word 'blank'. I'm not sure how to say that I want to keep
> the record but clear the field for this merge. Any thoughts?
myrnapap@yahoo.com - 30 Mar 2006 16:14 GMT
The field contains a statement "This field intentionally left blank". I
am merging many fields and this is just one of them. I don't want to
skip the record, I just want to print nothing if this is in the field.
Myrna
Peter Jamieson - 30 Mar 2006 19:29 GMT
Matching an exact text is straightforward - just use the whole text instead
of the single word example I gave before. If the text is the same apart from
capitalisation you can use the appropriate \* switches in your MERGEFIELD
field to make the text upper or lower case.
You can also use wildcards to a limited extent, e.g.
{ IF { MERGEFIELD myfield } = "*blank" "x" "y" } should give you "x" if
myfield contains your sample text. You can also do
{ IF { MERGEFIELD myfield } = "something*" "x" "y" } but you can't achieve a
"contains" using
{ IF { MERGEFIELD myfield } = "*something*" "x" "y" }
It doesn't work. Also, you may find that matching only works on relatively
short texts up to 128 characters. There's more about this in Word Help.
Peter Jamieson
> The field contains a statement "This field intentionally left blank". I
> am merging many fields and this is just one of them. I don't want to
> skip the record, I just want to print nothing if this is in the field.
> Myrna