Hi Graham - I've been swamped since you replied to me and I finally
had a chance to try this out. What I am not getting is this.
Peter told me I cannot just type the string in and that thru CTRL F9
is how you access the coding, but when I do this, I know it's real
code as it appears gray, but it is putting other codes in there that
are not in the string that you and Peter have provided me. And,
since there are many codes, i.e., IF, MERGEFIELD, False (my is not
UPPER), I don't know how to insert the entire string using the real
codes.
Here's what I'm attempting to do. I hit CTRL F9, and see 2
brackets, then I right click in between the brackets and select
edit field and then hit "Field Codes" and the formula box appears
that starts out with an "=" sign. I hit the down arrow on paste
function to find my IF command and it looks like this =IF(). I
select ok to get out of the formula so I can select my MERGEFIELD
Series_6, but when I get out of the formula bar, my code is this, {
{=IF(MAX() }}, so I go get my mergefield and now it looks like
this. { {=IF(MAX({MERGEFIELD Series_6})) }}, then I type in =
"False", then insert the box in quotes and then insert the checkbox
in quotes and I get nothing.
I really want to figure out how to do this, because once I
understand, then I will be in command using the programming language
in Word 2007. These are my steps and are apparently incorrect,
because when I unselect view codes, there is no return on my string
- I get nothing.
Please share the steps how I can insert multiple codes because what
you and Peter have given me seems relatively simple, but how to get
these codes is where I'm struggling.
Thanks again Peter and Graham for your help in making me understand
this process.
Susan
:
First establish *exactly* what {MERGEFIELD "Series_6"} produces.
Let's assume that it is 'False'
Then the syntax is
{IF {MERGEFIELD Series_6} = "False" "Insert the box symbol" "Insert
the checkbox symbol" }
with plain rather than smart quotes where shown.
Both sets of {} brackets are inserted with CTRL+F9
If the result could be False or FALSE or false then you will need
to convert the case of the result thus:
{IF {MERGEFIELD Series_6 \*Upper} = "FALSE" "Insert the box symbol"
"Insert the checkbox symbol" }
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Susan May wrote:
Peter - Here's what I have:
{IF " {MERGEFIELD "Series_6"} = "False" " (I inserted the box
symbol here)" "(I serted the checkbox symbol here)", and on this
particular record, this guy has a Series 6 license, and it is
checked on the Access form, and it's checked in the query that is
attached to this Word document, but it returns the value as
False, rather than using the checkbox because the value should be
coming back as True. Should there not be an "ELSE" after the box
symbol? What I have looks like what you typed below only the
second box is a checkbox, but the values are not coming out
correct. I'm stumped.
:
You should be able to change keystroke assignments in
Tools->Customize (Word 2003 and arlier) or Word Office
Button->Word Options->Customize (Word 2007 (the options's at the
bottom of the dialog box)
Otherwise, you can insert another type of field, such as [ DATE
}, e.g. using Insert-Field in Word 2003 and earlier, or
Insert->Quick parts->Field in Word 2007, then delete the "DATE"
part and substitute the text you need. Or you can copy/paste
another field.
{ IF"{ MERGEFIELD "«Series_6»"}= "FALSE" "?" "?"} PS - after
False, I have
This looks as if you may have wrapped a MERGEFIELD aroundanother
mergefield - unless your field name actually has chevrons around
it, you should be seeing something more like
{ IF "{ MERGEFIELD "Series_6" }" = "False" "?" "?" }
but with the characters you need instead of the boxes. The text
probably needs to be specifically against mixed-case "False", or
you can do
{ IF "{ MERGEFIELD "Series_6" \*UPPER }" = "FALSE" "?" "?" }
As long as the merge field name doesn't have spaces etc. in it,
you can do
{ IF "{ MERGEFIELD Series_6 \*UPPER }" = "FALSE" "?" "?" }
but you either need quotes on both sides of the MERGEFIELD field
(Personally I have found marking strings as such rather more
reliable in the field world...
{ IF "{ MERGEFIELD Series_6 \*UPPER }" = "FALSE" "?" "?" }
....but some people prefer
{ IF { MERGEFIELD Series_6 \*UPPER } = "FALSE" "?" "?" }
--
Peter Jamieson
http://tips.pjmsn.me.uk
Peter, I am trying to do what you told me to do below and I'm
having trouble
with using the Control + F9. When I hit Alt + F9, I see all the
codes, I put
my cursor over it and it looks like Control +F9 is assigned to
"Find". How
can I change that? You told me I cannot type the syntax in,
that I would have to insert the field codes this way. This is
what I've typed, but it is
not working.
{ IF"{ MERGEFIELD "«Series_6»"}= "FALSE" "?" "?"} PS - after
False, I have
the unchecked box in quotes, and then the checked box after
that, but it's not showing here.
Would appreciate a little more help with this as I have numerous
fields to do this for.
Thanks.
Susan.
:
Insert the following nested fields in your document. Each pair
of {} needs
to be the special field code braces that you can insert using
ctrl-F9 - you
can't just type them. Change mybox to the name of your field
and substitute
the appropriate symbols where I have typed <unchecked box
character> and <checked box character>.
{ IF "{ MERGEFIELD "mybox" }" = "False" "<unchecked box
character>" "<checked
box character>" }
This assumes that you are using Word 2002/2003/2007 and have
not altered the
way it connects to Access. if you are using DDE (the default in
Word 97/2000) or ODBC, then you need
{ IF "{ MERGEFIELD "mybox" }" = "0" "<unchecked box character>"
"<checked box character>" }
Or if for example you are just using a text field with Y and N
for "True" and "False", use
{ IF "{ MERGEFIELD "mybox" }" = "N" "<unchecked box character>"
"<checked box character>" }
Peter Jamieson
http://tips.pjmsn.me.uk
Susan May wrote:
I have a bunch of Yes/No fields in my Access form where I
check off if they
have certain licenses, and I attach this to a query which I
import into a
Word merge document. When I view the data in Word, it shows up
with a Yes/No, rather than a check box that is checked or
unchecked.
How can I get the check boxes to appear in MS Word's mail
merge file?
Many thanks.
Susan