Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2008
    Posts
    21

    Unanswered: Mail merge problem

    I have a form frmOrders_Main which is bound to the table tblOrder_Main and it has the following details, OrderID, OrderDate and Customer along with a subform listing all the products with their price for that order. I need to export these via mail merge to a word document, i.e. I want the resulting document to have details from subform as well. There is no facility in MSword to merge subform, that means I have to do it programatically. Can somebody assist me in this?

    Your assistance will be highly appreciated.
    Thanks

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    My first response is to ask why you feel you need to do it.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Apr 2008
    Posts
    21
    The merged infomation is necessary in the hardcopy that will have signatures and the like. Also the hardcopy will be used as gatepass; for security reasons no goods will be allowed past the main gate without a gatepass.

    I tried using report but with report I do not get the format my boss requires. That is why I opted for the mail merge.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I love not having a boss making silly requests of me

    Curious, what formatting can't be done in an Access report that your boss insists on?

    I don't know if Word has a way to overcome duplicates in a mail-merge, but the only way I can think of atm to do what you want (without advanced coding) is to create a query with both the data from the mainform and the data from the subform (which will give duplicates for the mainform data) and use that in the Word Mail Merge.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Apr 2008
    Posts
    21
    Normally after preparing the order it has to be emailed as MS word attachment to the property dpt (which, according too the current setup does not have an access to the database) for gatepass approval processing.
    The signed hard copy is what the the delivery courier shows the security guys at the gate.

    The access report could work fine had our dpt and property been in the same premisses we coud use the report printout, which is not the case here. Further more the export facility in access strippes down the any formatting the report has leaving near-plain text document, which explains why my boss doesnt want using report.

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Can't the report output just be sent via e-mail as a PDF file to whoever needs it? I still see nothing here that would make me resort to using Word.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  7. #7
    Join Date
    Apr 2008
    Posts
    21
    Lo and behold,
    It is so obvious and I couldnt see it.
    Thanks for the assistance

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    No problem, happy to help
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •