Convert Yes/No fields from Access into Check Boxes in Word Merge f

S

Susan May

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
 
P

Peter Jamieson

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
 
S

Susan May

I think I can follow that Peter. I'll give it a shot. Thanks. What would I
do without you?

Susan
 
S

Susan May

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.
 
P

Peter Jamieson

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" “†“ï’†}
 
S

Susan May

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.

Peter Jamieson said:
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

Susan May said:
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.
 
G

Graham Mayor

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Susan said:
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.

Peter Jamieson said:
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

Susan May said:
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
 
P

Peter Jamieson

As typed, this still has an unmatched quote before the MERGEFIELD field,
and in fact there is a space that should not be there before {MERGEFIELD
as well.

{IF " {MERGEFIELD "Series_6"} = "False" " (I inserted the box symbol here)"
"(I serted the checkbox symbol here)"

You also need to verify (going back to my original response) that the
value you are getting for { MERGEFIELD "Series" } on its own is actually
"True" or "False" and not, e.g. 0/-1 etc.

This stuff is like any other programming code in that precision is
important, although there is sometimes considerable leeway/optionality
in how to do things.
Should there not be an "ELSE" after the box symbol?

No - the syntax of the IF field is

{ IF comparand1 comparison_operator comparand2 result_if_true
result_if_false }

(typically, the results will be quoted strings of some kind, e.g.

{ IF comparand1 comparison_operator comparand2 "result_if_true"
"result_if_false" }

There's no THEN or ELSE in there.

Peter Jamieson

http://tips.pjmsn.me.uk

Susan said:
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.

Peter Jamieson said:
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

Susan May said:
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
 
S

Susan May

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

Graham Mayor said:
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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Susan said:
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.

Peter Jamieson said:
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
 
G

Graham Mayor

The curly field brackets {} are used in pairs and are created with CTRL+F9.
The rest is simply typed in between the relevant pairs of brackets. If you
insert a mergefield field from menu then it will 'disappear', though if you
toggle the display with ALT+F9 it should re-appear. Yet it is not necessary
to insert the mergefield from the menu if you know it by name, simply type
in the name as we have done in our replies.
In order for it to work, you have to establish what *EXACTLY* the mergefield
alone produces when merged. If you expect 'false' and it produces '0' or
'False' or 'FALSE' or something entirely different, it is never going to
work. The \* Upper switch simply reduces the scope for user error (i.e.
where the field may contain FALSE, False or false) as the conditions are
case sensitive.

So if your original requirement still stands, you should have
{IF {MERGEFIELD Series_6 \*Upper} = "FALSE" "Insert the box symbol" "Insert
the checkbox symbol" }
all on one line with spaces and quotes where I have shown them. Replacing
the Insert the box and checkbox entries with the actual symbols you wish to
display.

When you have insserted the fields, select them and press F9 to update then
and then ALT+F9 to display the result which should be a checked or unchecked
box depending on the data in that field for the current record.

You appear now to have introduced a MAX function and a formula field.
Frankly I don't see the relevance of this ... yet :)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



Susan said:
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

Graham Mayor said:
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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Susan said:
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
 
S

Susan May

IT WORKED! I have been working on this all morning, and I got one field to
work, then I copied and pasted it into about 30 others, and just changed the
field names, then went back to verify that the checked/unchecked boxes were
correct. We can now put this to bed.

Thank you Peter and Graham for helping me accomplish this and your
persistence in not giving up on me. This will save me a ton of time from
this point on, not having to manually check all these fields once I merge the
data to the Word form.

You guys are great!!

Graham Mayor said:
The curly field brackets {} are used in pairs and are created with CTRL+F9.
The rest is simply typed in between the relevant pairs of brackets. If you
insert a mergefield field from menu then it will 'disappear', though if you
toggle the display with ALT+F9 it should re-appear. Yet it is not necessary
to insert the mergefield from the menu if you know it by name, simply type
in the name as we have done in our replies.
In order for it to work, you have to establish what *EXACTLY* the mergefield
alone produces when merged. If you expect 'false' and it produces '0' or
'False' or 'FALSE' or something entirely different, it is never going to
work. The \* Upper switch simply reduces the scope for user error (i.e.
where the field may contain FALSE, False or false) as the conditions are
case sensitive.

So if your original requirement still stands, you should have
{IF {MERGEFIELD Series_6 \*Upper} = "FALSE" "Insert the box symbol" "Insert
the checkbox symbol" }
all on one line with spaces and quotes where I have shown them. Replacing
the Insert the box and checkbox entries with the actual symbols you wish to
display.

When you have insserted the fields, select them and press F9 to update then
and then ALT+F9 to display the result which should be a checked or unchecked
box depending on the data in that field for the current record.

You appear now to have introduced a MAX function and a formula field.
Frankly I don't see the relevance of this ... yet :)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



Susan said:
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

Graham Mayor said:
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
 
S

Susan May

Peter I sent this note below to you and Graham and then realized unless I
replied to one of your emails, you may not know how much you helped me.

"IT WORKED! I have been working on this all morning, and I got one field to
work, then I copied and pasted it into about 30 others, and just changed the
field names, then went back to verify that the checked/unchecked boxes were
correct. We can now put this to bed.

Thank you Peter and Graham for helping me accomplish this and your
persistence in not giving up on me. This will save me a ton of time from
this point on, not having to manually check all these fields once I merge the
data to the Word form.

You guys are great!!?"


Peter Jamieson said:
As typed, this still has an unmatched quote before the MERGEFIELD field,
and in fact there is a space that should not be there before {MERGEFIELD
as well.

{IF " {MERGEFIELD "Series_6"} = "False" " (I inserted the box symbol here)"
"(I serted the checkbox symbol here)"

You also need to verify (going back to my original response) that the
value you are getting for { MERGEFIELD "Series" } on its own is actually
"True" or "False" and not, e.g. 0/-1 etc.

This stuff is like any other programming code in that precision is
important, although there is sometimes considerable leeway/optionality
in how to do things.
Should there not be an "ELSE" after the box symbol?

No - the syntax of the IF field is

{ IF comparand1 comparison_operator comparand2 result_if_true
result_if_false }

(typically, the results will be quoted strings of some kind, e.g.

{ IF comparand1 comparison_operator comparand2 "result_if_true"
"result_if_false" }

There's no THEN or ELSE in there.

Peter Jamieson

http://tips.pjmsn.me.uk

Susan said:
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.

Peter Jamieson said:
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
 
G

Graham Mayor

You are welcome :)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Susan said:
IT WORKED! I have been working on this all morning, and I got one
field to work, then I copied and pasted it into about 30 others, and
just changed the field names, then went back to verify that the
checked/unchecked boxes were correct. We can now put this to bed.

Thank you Peter and Graham for helping me accomplish this and your
persistence in not giving up on me. This will save me a ton of time
from this point on, not having to manually check all these fields
once I merge the data to the Word form.

You guys are great!!

Graham Mayor said:
The curly field brackets {} are used in pairs and are created with
CTRL+F9. The rest is simply typed in between the relevant pairs of
brackets. If you insert a mergefield field from menu then it will
'disappear', though if you toggle the display with ALT+F9 it should
re-appear. Yet it is not necessary to insert the mergefield from the
menu if you know it by name, simply type in the name as we have done
in our replies.
In order for it to work, you have to establish what *EXACTLY* the
mergefield alone produces when merged. If you expect 'false' and it
produces '0' or 'False' or 'FALSE' or something entirely different,
it is never going to work. The \* Upper switch simply reduces the
scope for user error (i.e. where the field may contain FALSE, False
or false) as the conditions are case sensitive.

So if your original requirement still stands, you should have
{IF {MERGEFIELD Series_6 \*Upper} = "FALSE" "Insert the box symbol"
"Insert the checkbox symbol" }
all on one line with spaces and quotes where I have shown them.
Replacing the Insert the box and checkbox entries with the actual
symbols you wish to display.

When you have insserted the fields, select them and press F9 to
update then and then ALT+F9 to display the result which should be a
checked or unchecked box depending on the data in that field for the
current record.

You appear now to have introduced a MAX function and a formula field.
Frankly I don't see the relevance of this ... yet :)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



Susan said:
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
 
P

Peter Jamieson

Thanks for the feedback, Susan - for future reference I would normally
have seen the other branch of the conversation but was working with
"reduced facilities" for a few days :)

Peter Jamieson

http://tips.pjmsn.me.uk

Susan said:
Peter I sent this note below to you and Graham and then realized unless I
replied to one of your emails, you may not know how much you helped me.

"IT WORKED! I have been working on this all morning, and I got one field to
work, then I copied and pasted it into about 30 others, and just changed the
field names, then went back to verify that the checked/unchecked boxes were
correct. We can now put this to bed.

Thank you Peter and Graham for helping me accomplish this and your
persistence in not giving up on me. This will save me a ton of time from
this point on, not having to manually check all these fields once I merge the
data to the Word form.

You guys are great!!?"


Peter Jamieson said:
As typed, this still has an unmatched quote before the MERGEFIELD field,
and in fact there is a space that should not be there before {MERGEFIELD
as well.

{IF " {MERGEFIELD "Series_6"} = "False" " (I inserted the box symbol here)"
"(I serted the checkbox symbol here)"

You also need to verify (going back to my original response) that the
value you are getting for { MERGEFIELD "Series" } on its own is actually
"True" or "False" and not, e.g. 0/-1 etc.

This stuff is like any other programming code in that precision is
important, although there is sometimes considerable leeway/optionality
in how to do things.
Should there not be an "ELSE" after the box symbol?

No - the syntax of the IF field is

{ IF comparand1 comparison_operator comparand2 result_if_true
result_if_false }

(typically, the results will be quoted strings of some kind, e.g.

{ IF comparand1 comparison_operator comparand2 "result_if_true"
"result_if_false" }

There's no THEN or ELSE in there.

Peter Jamieson

http://tips.pjmsn.me.uk

Susan said:
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
 

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