I have a Form with a combo box on it. Once the user has made a selection you hit a button which launches \ generates a Mail Merge Word document. The document's source is the query "MailMerge".
The problem I'm having is that unless I refresh the Form by going from Design to Form view, before I want to launch the document, it asks me to enter a value for the parameter query. Why does it need refreshing each time? I tried putting in a "Form.Requery" command each time you clicked on the button but that didnt seem to work.
Also when it does launch successfully I'm getting the following message:
"The database has been placed in a state that prevents it from being opened or locked".
On these occassions the document is fine, but once I close it down again and try and go back to my database, it appears as though it has hung. This is the code behind the button:
Form.Requery
DocName = "C:\FolderName\Merge.doc"
retval = Shell("C:\Program Files\Microsoft Office\Office\WinWord.exe" & " " & DocName, vbNormalFocus)
How can I get round these problems? I tried searching thru' some of the older posts but there's so many on Mail Merges it's hard to find what you're looking for exactly.
The problem I'm having is that unless I refresh the Form by going from Design to Form view, before I want to launch the document, it asks me to enter a value for the parameter query. Why does it need refreshing each time? I tried putting in a "Form.Requery" command each time you clicked on the button but that didnt seem to work.
Also when it does launch successfully I'm getting the following message:
"The database has been placed in a state that prevents it from being opened or locked".
On these occassions the document is fine, but once I close it down again and try and go back to my database, it appears as though it has hung. This is the code behind the button:
Form.Requery
DocName = "C:\FolderName\Merge.doc"
retval = Shell("C:\Program Files\Microsoft Office\Office\WinWord.exe" & " " & DocName, vbNormalFocus)
How can I get round these problems? I tried searching thru' some of the older posts but there's so many on Mail Merges it's hard to find what you're looking for exactly.