Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Jesse[_3_] Jesse[_3_] is offline
external usenet poster
 
Posts: 2
Default puzzling number format problem in conditional field

I am doing a Word mailmerge with an Access database -- Office 2000.
The problem has to do with currency fields in the database and getting
the \# formatting to work.

Based on what I see, Word has default formatting for currency numbers
- putting a dollar sign in front of them unless you tell Word
otherwise. I have been able to override this by using a format
switch. So:

{MERGEFIELD ttl_price \###.00}

However, when I add this switch to this mergefield within a
conditional statement -

{IF { MERGEFIELD country} = "United States", "{MERGEFIELD ttl_price
\###.00}" "" }

- the formatting code disappears when I switch to "View merged data"
and back - and so it has not effect.

A workaround has been to add the mergefield to zero, and then the
formatting will stick and work:

{ = {MERGEFIELD ttl_price} + 0 \# ##.00 }

However, this causes a troublesome blank space to appear before the
number.

Another workaround, which is the most puzzling to me (as to why it
works): I create {MERGEFIELD ttl_price \###.00} outside the IF
statement and then paste it inside the statement,. Even with this
approach, every mergefield that I want within the IF statement has to
be pasted in as a block; if I just past in 1 field after others are
there, the new 1 filed disappears.

Please note, all of the { } brackets are created by doing an insert -
i.e., not by typing the brackets. AFAIK, when adding a mergefield one
has to manually add in the formatting - i.e., there is no "insert
field switch format picture", so entering it by typing should work.

Also, in order to try to suppress Word adding a $, I did try changing
the field type in Access from currency to number, but then anything
right of the decimal was dropped.

Any ideas as to why there is a problem formatting within the IF
statement? Especially, why creating the code outside the IF statement
and then pasting it in works? Thanks. -- Jesse.


 
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
Field codes: MergeField field RTF format problem Amdious Mailmerge 4 September 17th 07 02:38 PM
Conditional Currency/Text Field Format in Merge Suzamo Mailmerge 3 March 14th 07 11:06 AM
Number format field wordspinster Page Layout 1 August 5th 06 12:21 AM
How do i format how a number field displays? Maui Time Jen Mailmerge 2 September 14th 05 04:55 AM
Attaching Expansion Pack to Word Documents - Puzzling Problem Jose Microsoft Word Help 1 March 3rd 05 10:14 AM


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