Reply
 
Thread Tools Display Modes
  #1   Report Post  
JodiMac
 
Posts: n/a
Default If statement returning true result when should be false

I've tried to resolve this myself, but have given up!

I'm using office 2003 and merging data from an Excel spreadsheet into a word
document. I want to conditionally print a line (the Objective) when data
changes in one of the Excel columns.

{If {MergeRec} = 1 {SET MyIndex " "}
{if MyIndex {Mergefield Objective} "Objective: {Mergefield Objective} "
"" }
{SET MyIndex {Mergefield Objective} }

{Mergefield QuestionText}
A. {Mergefield Answer_a_text}
B. {Mergefield Answer_b_ text}
IF {Mergefield Answer_c_text} "" "C. " ""}{Mergefield Answer_c_text}
IF {Mergefield Answer_d_text} "" "D. " ""}{Mergefield Answer_d_text}

The results are inconsistent. For the first record, the Objective prints
fine. When the objective changes the first time, the new (second) Objective
is not printed. But on about the fifth change in objectives, it is again
printed. I have even gone so far as to print the values of the MyIndex field
and the Objective field for each record and I can see where they are
different but the If MyIndex = Objective test is evaluated as true!! Is
there a character limit? Some objectives are up 149 characters.

Any suggestions?

Thanks so much,

JodiMac



















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
Table in a Form HiDbLevel Tables 12 February 27th 06 12:59 PM
Convert numeric value into english word RKS Microsoft Word Help 1 August 25th 05 07:33 PM
CardText Field Switch JoyceA Mailmerge 2 June 18th 05 11:05 AM
macro problems Stephen Larivee New Users 6 April 7th 05 07:03 PM
How do I turn dollar amounts into words? Theresa Wright New Users 5 January 25th 05 10:28 AM


All times are GMT +1. The time now is 10:30 PM.

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"