Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Len Robichaud Len Robichaud is offline
external usenet poster
 
Posts: 1
Default If Statement Always Resolves to False

What am I doing wrong? The following always resolves to False.
{ ASK txtName "Enter Name" \*MERGEFORMAT }

{ REF txtName } 'Prints - Len



{ IF { REF txtName } = "Len" "Me" "Someone Else" } 'Prints - Someone Else



TIA

Len


  #2   Report Post  
Posted to microsoft.public.word.newusers
Herb Tyson [MVP] Herb Tyson [MVP] is offline
external usenet poster
 
Posts: 2,936
Default If Statement Always Resolves to False

Hi, Len,

I tried your fields here, and they work perfectly. What version of Word are
you using?

Since the REF txtName field is working for you, I would focus on a possible
error (typo) in the IF statement. Are you sure your IF statement is what you
included in this message?

See if you can get it to return ME for anything at all. For example:


{ IF "Len" = "Len" "Me" "Someone Else" }

Does that statement return ME for you? If not, then how about:

{ if "1" = "1" "Me" "Someone Else" }

Does that statement work? Once you get it working for anything all, work
fowards and see if you can find out where it breaks down. If all else fails,
feel free to send me a small document containing the fields, and I can take
a look to see if there's an error I can spot. Send to herb at herbtyson dot
com.

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


"Len Robichaud" wrote in message
t.net...
What am I doing wrong? The following always resolves to False.
{ ASK txtName "Enter Name" \*MERGEFORMAT }

{ REF txtName } 'Prints - Len



{ IF { REF txtName } = "Len" "Me" "Someone Else" } 'Prints - Someone Else



TIA

Len



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
which statement right , question is Choose the correct statement? how many template?when we click new doc Microsoft Word Help 1 October 16th 06 11:15 AM
which statement right , question isChoose the correct statement? how many template?when we click new doc Microsoft Word Help 1 October 15th 06 11:20 PM
DisplayAsIcon:=False is sometimes ignored Scott Pendleton, Tulsa, OK Page Layout 0 May 19th 06 04:49 AM
If statement returning true result when should be false JodiMac Mailmerge 0 October 31st 05 09:52 PM
Format true/false mergefield Gary O Mailmerge 1 April 7th 05 07:48 AM


All times are GMT +1. The time now is 03:31 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"