I have a form that when a “Print approval” button is pushed, it starts a macro that uses RunApp to start a Word Document. This Word document is set up to pull the fields contact_full_name, Vendor_name, Address, city, state, zip, Contact_first_Name, customer, Term, spread1, Approval_Amount_2, and Expdate out of a query, and merge them into a Word document via DDE. Each record has a application number, and the query specifies the application number showing on the form [Forms]![Activity Log]![Application Number] so Word selects the correct record [Application Number] to pull the data from. Word then creates a new document with the merged data and remains open so that the document can be modified, and then saved under a different file name.
This was all working fine until I changed the database using the start up option to prevent users from getting under the covers. Now when the “Print approval” button is pushed, the macro launches Word, but Word pops up with a box that says “Enter Parameter Value” specifying [Forms]![Activity Log]![Application Number]. When I open the database while holding down the shift key, the Word document merges the data with no user intervention needed.
I’m a complete noobie when it comes to VB, and I’ve searched around and round, and haven’t found a good simple solution that would allow me to use Automation with a query and get rid of DDE. I haven’t figured out how to fix it so DDE works properly either. I’ve also updatede to the latest service packs and patches for both Word and Access. Any help or advice would be greatly appreciated.
Thanks