Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nasscott
 
Posts: n/a
Default Blank fields showing as zero

I am using Word mailmerge to print fields calculated in Access. I want a
null or zero result to print as blank. Should be simple but ... !!
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Blank fields showing as zero

Use a conditional field
{IF{Mergefield fieldname} 0 "{Mergefield Fieldname}"}
See also http://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

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


Nasscott wrote:
I am using Word mailmerge to print fields calculated in Access. I
want a null or zero result to print as blank. Should be simple but
... !!



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod
 
Posts: n/a
Default Blank fields showing as zero

Hi Nasscott,

To fix this:
.. press Alt-F9 in your mailmerge document to toggle the field code display
on. You should see something like:
{Mergefield DataField} or {Mergefield DataField \# 0.00}
..edit the field code so that it formats the result how you want it. For
example:
{Mergefield DataField \# $,0.00;($,0.00);}
will show the value as dollars and cents, with -ve values in brackets, and
the final ';' suppresses 0 output.

If you're working with what is meant to be purely textual data, formatting
the field as {Mergefield DataField \# ;} will likewise suppress any 0s
(along with any other mixed alpha-numeric output).

If you need to show mixed alpha-numeric output, but suppress errant 0s, try:
{IF{Mergefield DataField}= 0 "" {Mergefield DataField}}
to do this, you'll need to:
.. copy & paste your mergefield, so that you get
{Mergefield DataField} {Mergefield DataField}
..select both mergefields and press Ctrl-F9 (to wrap them in another field,
thus-
{{Mergefield DataField} {Mergefield DataField}}
.. fill in around the field braces as indicated, taking special care with
spacing.

Cheers

"Nasscott" wrote in message
...
I am using Word mailmerge to print fields calculated in Access. I want a
null or zero result to print as blank. Should be simple but ... !!



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nasscott
 
Posts: n/a
Default Blank fields showing as zero

Thanks Graham - the conditional construct was beyond me but I found the
answer on your website - amazing what a couple of semicolons can do !

"Graham Mayor" wrote:

Use a conditional field
{IF{Mergefield fieldname} 0 "{Mergefield Fieldname}"}
See also http://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

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


Nasscott wrote:
I am using Word mailmerge to print fields calculated in Access. I
want a null or zero result to print as blank. Should be simple but
... !!




  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
tamee tamee is offline
external usenet poster
 
Posts: 9
Default Blank fields showing as zero

This is very useful to me. But how do you convert date serial number from
excel to a particular date format in a merge field?

"macropod" wrote:

Hi Nasscott,

To fix this:
.. press Alt-F9 in your mailmerge document to toggle the field code display
on. You should see something like:
{Mergefield DataField} or {Mergefield DataField \# 0.00}
..edit the field code so that it formats the result how you want it. For
example:
{Mergefield DataField \# $,0.00;($,0.00);}
will show the value as dollars and cents, with -ve values in brackets, and
the final ';' suppresses 0 output.

If you're working with what is meant to be purely textual data, formatting
the field as {Mergefield DataField \# ;} will likewise suppress any 0s
(along with any other mixed alpha-numeric output).

If you need to show mixed alpha-numeric output, but suppress errant 0s, try:
{IF{Mergefield DataField}= 0 "" {Mergefield DataField}}
to do this, you'll need to:
.. copy & paste your mergefield, so that you get
{Mergefield DataField} {Mergefield DataField}
..select both mergefields and press Ctrl-F9 (to wrap them in another field,
thus-
{{Mergefield DataField} {Mergefield DataField}}
.. fill in around the field braces as indicated, taking special care with
spacing.

Cheers

"Nasscott" wrote in message
...
I am using Word mailmerge to print fields calculated in Access. I want a
null or zero result to print as blank. Should be simple but ... !!




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
Blank return for drop-down form fields Peter B. Microsoft Word Help 4 January 26th 07 05:01 PM
Word mail merge should suppress blanks left by blank fields. k2swan Mailmerge 1 November 18th 05 09:41 PM
suppress spaces left by blank mail merge fields k2swan Mailmerge 1 November 18th 05 09:41 PM
How to supress blank merge fields in Word 2002 DiTab1 Microsoft Word Help 9 November 10th 05 04:56 PM
Mailmerge:unwanted blank lines caused by empty data fields Mail merge - Empty data field Microsoft Word Help 0 October 5th 05 01:09 PM


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