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