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 / August 2005

Tip: Looking for answers? Try searching our database.

If statement problems in mail merge

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jameseyryan - 05 Aug 2005 15:48 GMT
I have a database in Microsoft Access 2003 which i am linkin to word 2003 via
mail merge.

I want to check the answer given in the access form is "Yes". If it is i
want to put in a value from a different mergefield, if not, a blank value. At
the moment my if statment reads like this:

{ IF { MERGEFIELD OneDependent } = "Yes" "{ MERGEFIELD Child1Forename }" "" }

A value of MERGEFIELD is all that appears. There is data in the database for
the fields: "OneDependent" and also for "Child1Forename". What am i doing
wrong?
Doug Robbins - 05 Aug 2005 17:52 GMT
I would do all of the data manipulation with a Query in Access and then use
that Query as the datasource.

However, I think your problem is that you did not use Ctrl+F9 to insert the
field delimiters around the MERGEFIELD Child1Forename

Signature

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

>I have a database in Microsoft Access 2003 which i am linkin to word 2003
>via
[quoted text clipped - 12 lines]
> the fields: "OneDependent" and also for "Child1Forename". What am i doing
> wrong?
jameseyryan - 05 Aug 2005 19:06 GMT
I can't do a query in access to manipulate the data first as the fild
"Child1Forename" is entered into the document more than once. It is needed in
one place but may not in the place I am having this problem with.

As for using CTRL + F9 for the delimiters, I did that too but no luck either.
Doug Robbins - 05 Aug 2005 19:52 GMT
That would not preclude you from using a query in Access.  You can have the
Child1Forename field in the query as well as any number of conditional
fields that may return the Child1Forename field if the condition is met.

I cannot replicate your problem here when using and If...then...Else field
in a mailmerge main document.

If you want to send me your document, I will take a look at if for you.

Signature

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

>I can't do a query in access to manipulate the data first as the fild
> "Child1Forename" is entered into the document more than once. It is needed
[quoted text clipped - 3 lines]
> As for using CTRL + F9 for the delimiters, I did that too but no luck
> either.
Peter Jamieson - 05 Aug 2005 20:19 GMT
When you get "YesNo" data from Access, the values you see depend on how you
are connecting to your access/jet data file.

If you are using DDE (the default in Word 2000 and earlier), then "Yes"
shows up in Word as "-1" and the "No" as "0"
If you are using OLEDB (the default in Word 2002/2003) the "Yes" shows up as
"True" and "No" as False"
If you are using ODBC, the "Yes" shos up as "1" and the "No" as "0"

So you need to put the right test, depending on how you are connecting, into
your IF field, e.g.

{ IF { MERGEFIELD Child1Forename } = 0 "the 'no' result" "the 'yes'
result" }

unless you're using OLEDB in which case you need

{ IF { MERGEFIELD Child1Forename } = "False" "the 'no' result" "the 'yes'
result" }

Peter Jamieson
>I can't do a query in access to manipulate the data first as the fild
> "Child1Forename" is entered into the document more than once. It is needed
[quoted text clipped - 3 lines]
> As for using CTRL + F9 for the delimiters, I did that too but no luck
> either.
Doug Robbins - 05 Aug 2005 20:42 GMT
Another reason for doing the data manipulation in the database<g>

Signature

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

> When you get "YesNo" data from Access, the values you see depend on how
> you are connecting to your access/jet data file.
[quoted text clipped - 24 lines]
>> As for using CTRL + F9 for the delimiters, I did that too but no luck
>> either.
Peter Jamieson - 05 Aug 2005 21:29 GMT
Absolutely.

Peter Jamieson
> Another reason for doing the data manipulation in the database<g>
>
[quoted text clipped - 26 lines]
>>> As for using CTRL + F9 for the delimiters, I did that too but no luck
>>> either.
 
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.