View Single Post
  #11   Report Post  
Posted to microsoft.public.word.mailmerge.fields
GaryNSHC GaryNSHC is offline
external usenet poster
 
Posts: 5
Default Merging Access data into a Word document

My apologies, I am using an IF condition as well as a MERGEFIELD.

The one which works in a single record is:
{IF {mergefield MAACTeam} = "0", "No", "Yes"} and I get "NO"
if I change = "0" to either = "TRUE" or = "FALSE" I get "YES" which is
incorrect.

The one which works for all records is:
{IF {mergefield MAACTeam} = "FALSE", "No", "Yes"} I get either "YES" or "NO"
if I change = "FALSE" to either = "0" or = "-1" I get "YES" for all records
which is incorrect.

If I have just:
{mergefield MAACTeam} I get either "0" or "-1" depending on whether it
should be "YES" or "NO".

Hope this clarifies the problem being encountered.

Regards

Gary

"Graham Mayor" wrote:


What exactly does {Mergefield name} produce when inserted without a
condition?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


GaryNSHC wrote:
I am using this piece of code and am having a little problem with my
mergefields not picking up the correct value for a YES/NO field.

If I use {mergefield name ="false" ...} it doesn't work with single
records but does when I use all records.

BUT ..

When I use {mergefield name = "0" ..} it works for single records but
not for all records.

Whichever way I go, I can't seem to get the word template to pay ball
correctly whether I use a single record or merge all records.

Has anyone else come across this, and if so, how was it resolved?

Regards

Gary

"Doug Robbins - Word MVP" wrote:

See the "Super Easy Word Merge" item at
http://www.members.shaw.ca/AlbertKal.../msaccess.html

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP