Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Russell Pascoe Russell Pascoe is offline
external usenet poster
 
Posts: 1
Default Show two fields from next record conditional upon one original fie

Thanks for looking at this, it's got me foxed, I feel I'm on the cusp of
working it out, but not quite!

I want to print a document using a database that sometimes interlinks with
the next record. I run a small property business and would like to automate
the contract process. I fill in the database with all details and then go to
print the contract interrogating the database. Sometimes there is one tenant,
sometimes two. So sometimes I want to put two names on the contract - surely
a simple "IF THEN" statement? i.e.:

First Name ¦ Last Name ¦ Property ¦ Sharing ¦ Rent
John Brown 3234 Yes 250
Jane Brown 3234 Yes 250
Fred Smith 3235 No 230

So what I want is to go to the first record, get John Brown's name, which is
easy, but then do IF THEN ELSE, IF Sharing = "Yes" "Next Record First_Name
Last_Name" "." But I can't seem to get the syntax right and am producing
nonsense all over the place.

If you know how to help me, I would be very grateful!

Thank you!
Russell.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Show two fields from next record conditional upon one original fie

Off the top of my head, try

{ NEXTIF "{ MERGEFIELD Sharing }" = "Yes" }
}{ IF "{ MERGEFIELD Sharing }" = "Yes|"
"{ MERGEFIELD First_Name } { MERGEFIELD Last_Name }" ""
} whatever text you want regardless of whether there are one or two.

However, it will only work properly if the "Sharing" properties always come
in pairs (not in 1s, 3s etc.)

All the {} need to be the special field braces that you can insert using
ctrl-F9, as usual.

Peter Jamieson
"Russell Pascoe" wrote in message
...
Thanks for looking at this, it's got me foxed, I feel I'm on the cusp of
working it out, but not quite!

I want to print a document using a database that sometimes interlinks
with
the next record. I run a small property business and would like to
automate
the contract process. I fill in the database with all details and then go
to
print the contract interrogating the database. Sometimes there is one
tenant,
sometimes two. So sometimes I want to put two names on the contract -
surely
a simple "IF THEN" statement? i.e.:

First Name ¦ Last Name ¦ Property ¦ Sharing ¦ Rent
John Brown 3234 Yes 250
Jane Brown 3234 Yes 250
Fred Smith 3235 No 230

So what I want is to go to the first record, get John Brown's name, which
is
easy, but then do IF THEN ELSE, IF Sharing = "Yes" "Next Record First_Name
Last_Name" "." But I can't seem to get the syntax right and am producing
nonsense all over the place.

If you know how to help me, I would be very grateful!

Thank you!
Russell.


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Show two fields from next record conditional upon one original fie

You cannot nest NEXT fields nor can you look backwards through the record
set.
See How to use mail merge to create a list sorted by category in Word 2002 -
http://support.microsoft.com/?kbid=294686

--

Graham Mayor - Word MVP

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


Russell Pascoe wrote:
Thanks for looking at this, it's got me foxed, I feel I'm on the cusp
of working it out, but not quite!

I want to print a document using a database that sometimes
interlinks with the next record. I run a small property business and
would like to automate the contract process. I fill in the database
with all details and then go to print the contract interrogating the
database. Sometimes there is one tenant, sometimes two. So sometimes
I want to put two names on the contract - surely a simple "IF THEN"
statement? i.e.:

First Name ¦ Last Name ¦ Property ¦ Sharing ¦ Rent
John Brown 3234 Yes 250
Jane Brown 3234 Yes 250
Fred Smith 3235 No 230

So what I want is to go to the first record, get John Brown's name,
which is easy, but then do IF THEN ELSE, IF Sharing = "Yes" "Next
Record First_Name Last_Name" "." But I can't seem to get the syntax
right and am producing nonsense all over the place.

If you know how to help me, I would be very grateful!

Thank you!
Russell.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional use of merge fields suddenly failing [email protected] Mailmerge 4 May 17th 06 09:02 AM
Conditional Fields.. GH Mailmerge 2 May 10th 06 11:06 AM
Conditional fields Island Girl New Users 5 April 18th 06 12:56 AM
Help on Mail Merge just only Show One Record Alan Tang Mailmerge 2 February 21st 06 10:57 AM
Conditional record merging not working in Word 2003 Carey G Mailmerge 2 January 9th 06 07:31 PM


All times are GMT +1. The time now is 09:36 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"