View Single Post
  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Problem with merge field switches when merging from Access 200

The entry in the query should be

[ColFee]: Format([Account Information]![Col#]*0.65, "$#,###.00")

The [ ] around ColFee are unnecessary so it could just be:

ColFee: Format([Account Information]![Col#]*0.65, "$#,###.00")

in which case the name of the mergefield would appear as ColFee rather than
[ColFee]
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Chris" wrote in message
...
Thanks Doug,

That does clarify it a bit. I am trying to do this now. I should note
that
this is a calculated query field in Access 2007 and the expression now
looks
like this:

Format([ColFee],"$#,###.00"): ([Account Information]![Col#]*0.65)

where formaerly it looked like this:

[ColFee]: ([Account Information]![Col#]*0.65)

There is apparently a syntax error in the calculated field. Any ideas?

Thanks, Chris

"Doug Robbins - Word MVP" wrote:

Exactly how did you apply the Format() function in Access

What I meant was to use Format([ColFee],"$#,###.00") in a query. Not to
format the field type in the Table Design as Currency as that only
dictates
how the data is displayed in Access and not how it is stored.

Using the Format() function converts the numeric data to text so that no
format switch is required when the data from a query is used in mail
merge.



--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services
on
a paid professional basis.

"Chris" wrote in message
...
Hello Doug,

Sorry for the lateness of the reply but it seems the postings were not
being
listed until just now.

The ommission of the \* was a typo on my part in the original posting -
it
was not ommitted in the Word file. My apologies. Changing the Field
switch
and updating always resulted in an error. I did in fact also format
the
field in the Access file as Currency (2 decimal places), but that had
no
effect either. Because it was not working I ended up saving the Word
file
and the Access files in 2003 formats. This did work.

I am beginning to think that there are some issues here that need to be
sorted out my Microsoft.

"Doug Robbins - Word MVP" wrote:

You have omitted the \#

You should be using { MERGEFIELD ColFee \# "$,#.00;($,#.00" }

Note however, if you are using the Format() function in a query in
Access
to
format the currency to the way that you want it, that will convert it
to
text and no further formatting will be required in Word.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Chris" wrote in message
...
Hello,

I have been trying to insert the merge field switches to control the
appearance of data merged from Access 2007.

I am merging from an Access dbase query and I converted the fields
in
Access
to Currency and 2 decimal places there first.

I went into the the Word 2007 options and turned on "Confirm file
format
conversion on open". In the Confirm Data Source dialogue box I am
selecting
MS Access Databases via DDE (*.mdb;*.mde). There is often a problem
with
this little procedure as well, but that is for a different day.

I am inserting the field switches as indicated on Graham Mayor's
website
at
http://www.gmayor.com/formatting_word_fields.htm

When I toggle the field code in Word this is what I am using:
{ MERGEFIELD ColFee "$,#.00;($,#.00" }

I have tried other methods as well but nothing seems to work.

Any help with this would be greatly appreciated. Thanks,

Chris


.


.