Results 1 to 6 of 6
  1. #1
    Baldeagle is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Location
    Northern Ireland
    Posts
    136

    Mail Merge from Access Query


    I have set up a Word document which draws its information from an Access Query. The Query has a calculated field - Tax: CCur(Int((((Int(((100*[Total Paid]/(100-[Rate of Tax]))*100)+0.5)/100)+0.01))*[Rate of Tax])/100). The ouput of this query is currency and includes any final zeros (eg $120.50). But when I insert this field into the mail merge document it loses any final zeros. How can I hold the proper format in the mail merge document?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try wrapping your function in a Format() function.

  3. #3
    Baldeagle is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Location
    Northern Ireland
    Posts
    136
    Quote Originally Posted by RuralGuy View Post
    Try wrapping your function in a Format() function.
    Thanks for the suggestion but could you please be a little more explicit? I'm not an expert and don't understand what you mean. Where do I use the Format() function? In my Query in Access? If so how? Or in the Word document? I would appreciate a little bit more guidance.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try:
    Tax: Format(CCur(Int((((Int(((100*[Total Paid]/(100-[Rate of Tax]))*100)+0.5)/100)+0.01))*[Rate of Tax])/100),"$###,##0.00")

  5. #5
    Baldeagle is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Location
    Northern Ireland
    Posts
    136
    Quote Originally Posted by RuralGuy View Post
    Try:
    Tax: Format(CCur(Int((((Int(((100*[Total Paid]/(100-[Rate of Tax]))*100)+0.5)/100)+0.01))*[Rate of Tax])/100),"$###,##0.00")
    Brilliant. That does exactly what I want. Many thanks.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Great! Glad we could help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Mail merge from from Access to Word
    By williamgladstone in forum Access
    Replies: 1
    Last Post: 03-22-2011, 12:00 PM
  2. Mail Merge with Access
    By missesclick in forum Access
    Replies: 6
    Last Post: 12-09-2010, 01:28 PM
  3. Access Query mail merge to Word
    By Jan Collier in forum Access
    Replies: 8
    Last Post: 08-30-2010, 09:52 AM
  4. Mail merge from two access tables
    By Peter in forum Access
    Replies: 2
    Last Post: 08-24-2010, 12:17 PM
  5. Mail Merge from Access to Word
    By Rachelkm2 in forum Programming
    Replies: 1
    Last Post: 05-29-2009, 02:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums