Results 1 to 7 of 7
  1. #1
    Eef is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2014
    Posts
    11

    Lightbulb MS Word using merge with Access-data

    I created a MS Word document and want to use data from an Access-DB.

    I use a field which is in Access of type Currency. In the Word document it represents as a normal numeric field.
    Example:
    Access shows € 45,50
    Word shows this as 45,5

    How can I present this data in Word also as Currency?

    Eef

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,960
    Might have to use the Format function on the field to convert value to a string that includes the monetary symbol. This way the symbol will export with the data. Or include the symbol within the body of the Word document.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Eef is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2014
    Posts
    11
    Quote Originally Posted by June7 View Post
    Might have to use the Format function on the field to convert value to a string that includes the monetary symbol. This way the symbol will export with the data. Or include the symbol within the body of the Word document.
    Thanks for the answer. Just including the currency symbol is not enough. The value also needs 2 decimals.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,960
    Concatenate.

    "€ " & Format([field], "0.00")

    If you want a fixed length string:

    "€" & String(7 - Len(Format([field],"0.00"), " ") & Format([field], "0.00")
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Eef is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2014
    Posts
    11

    Lightbulb Edit fields when merging Word with Acces (of Excel)

    Quote Originally Posted by June7 View Post
    Concatenate.

    "€ " & Format([field], "0.00")

    If you want a fixed length string:

    "€" & String(7 - Len(Format([field],"0.00"), " ") & Format([field], "0.00")
    I think I found the final solution. It is NOT in Access but in Word where to solve this problem.

    When merging Word with Access-data only the value stored in the db will be used. No formatting is involved. Unless you created a query with textfields for the purpose.

    If you're in the main-docoment use Alt-F9. Then you see all the fields you are using, also the Access-fields. You are now able to attach editing/formatting info to the field.
    In my case with the currency field it looks like this: {MERGEFIELD "<Fieldname>" \# €###0,0.0}
    or for date fields: {MERGEFIELD "<Fieldname>" \@ DD-MM-yyyy}

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,960
    I've never done Access/Word mail merge so thanks for the followup info. But not sure what you mean by 'main-document' - what other document would there be?

    However, the suggested expression should also work because it results in a text field in query. Use query as the data source for mail merge.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Eef is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2014
    Posts
    11
    Quote Originally Posted by June7 View Post
    I've never done Access/Word mail merge so thanks for the followup info. But not sure what you mean by 'main-document' - what other document would there be?

    However, the suggested expression should also work because it results in a text field in query. Use query as the data source for mail merge.
    When you mail merge in Word you always have 2 resources:
    1. a Word-document (the main-document) with text, figures, whatever and one or more fields from a second resource.
    2. the second resource. This can be an Excel, Access document or even a table in another Word-document.

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

Similar Threads

  1. Replies: 6
    Last Post: 08-13-2014, 10:32 PM
  2. Access Query to Word Merge
    By besuchanko in forum Import/Export Data
    Replies: 1
    Last Post: 02-24-2013, 05:17 PM
  3. Replies: 1
    Last Post: 08-16-2012, 05:55 PM
  4. Mail merge from from Access to Word
    By williamgladstone in forum Access
    Replies: 1
    Last Post: 03-22-2011, 12:00 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