Blank fields showing as zero

N

Nasscott

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 ... !!
 
M

macropod

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
 
N

Nasscott

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

tamee

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top