Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / October 2003

Tip: Looking for answers? Try searching our database.

merge to word from access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JERRY - 03 Oct 2003 12:53 GMT
When I merge to word from access and want to access a YES-
NO field from ACCESS, I can not seem to get the right
syntac for doing an IF-THEN in the word merge field codes.

I have tried IF TRUE  then "Yes" (Otherwise) "NO"
I have trie IF -1
I have tried IF YES
none of them gives the proper merge results

Suggestions needed and welcome
Thank you
Peter Jamieson - 03 Oct 2003 15:14 GMT
Typically the following will work:

{ IF { MERGEFIELD myfield } = 0 "No" "Yes" }

--
Peter Jamieson
MS Word MVP

> When I merge to word from access and want to access a YES-
> NO field from ACCESS, I can not seem to get the right
[quoted text clipped - 7 lines]
> Suggestions needed and welcome
> Thank you
JERRY - 03 Oct 2003 16:12 GMT
Yes, thank you,
that is EXACTLY what I tried---and, I tried it again--
but the merge produces YES as the response for **every**
record.

Stumped.
JERRY

>-----Original Message-----
>Typically the following will work:
[quoted text clipped - 18 lines]
>
>.
Peter Jamieson - 03 Oct 2003 22:31 GMT
OK, what is the result of

{ MERGEFIELD myfield }

on its own, for Yes and No values?

(and just to be sure, you are using the special field code braces for all
the pairs of {}, and you have got spaces either side of the "=" sign?)

--
Peter Jamieson
MS Word MVP

> Yes, thank you,
> that is EXACTLY what I tried---and, I tried it again--
[quoted text clipped - 28 lines]
> >
> >.
JERRY - 04 Oct 2003 01:00 GMT
Yes, mergefield by itself yielded the correct answer in
true or false terms.

By looking areound the web and by applying an example I
saw I found a fix that works!

I don't have the document here,  as I am now home, but it
basically consisted of embeding the bracked statement
{ mergefield myfield }  inside of another set of brackets
and putting an equal sign in front, something like this:
{  {= {mergefield myfield }} 0  "No."  "Yes." }

>-----Original Message-----
>OK, what is the result of
[quoted text clipped - 44 lines]
>
>.
Peter Jamieson - 04 Oct 2003 09:32 GMT
In essence, whatever the Mergefield returns is what you need to test in your
{ IF } field.

The problem here is that Yes/No fields appear differently depending on which
method Word is using to connect to Access (and they may also depend on the
version of Access or the Jet database engine). This is complicated by the
fact that the default connection method changed from DDE to OLEDB in Word
2002.

The { = } approach is probably something like

{  IF {= { MERGEFIELD myfield } } = 0  "No."  "Yes." }

It should not be necessary to have the { = } field but since there is no
published specification of the "field language" in the end the only
specification available is  "if it works, it works" :-)

--
Peter Jamieson
MS Word MVP

> Yes, mergefield by itself yielded the correct answer in
> true or false terms.
[quoted text clipped - 58 lines]
> >
> >.
Cindy Meister  -WordMVP- - 04 Oct 2003 16:04 GMT
Hi Jerry,

> Yes, mergefield by itself yielded the correct answer in
> true or false terms.

Which version of Word is this, and which connection method
are you using to the data?

I noticed that Access 2002 tends to send literal Yes and No
(or True False) rather than 0 and 1/-1, as earlier versions
used to...

Cindy Meister
Signature

INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail

:-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.