Sorry if this is posted in the wrong subforum. It relates to macros, forms, and queries.
Heres the scoop:
I have a full screen form called frmMailMerge which shows a list of people who are on the email list, based on a query. At the top is a button which is intended to run the mail merge wizard.
The macro I have on this button:
1) OpenQuery: qryMailMerge
2) WordMailMerge
The issue is that WordMailMerge needs a query or a table as a reference. When my macro opens qryMailMerge, it opens behind frmMailMerge and I get an error because the WordMailMerge is trying to use the form instead of the query which was just opened.
I can add another command to the macro which first closes frmMailMerge, then opens qryMailMerge, then runs WordMailMerge, but doing this breaks the full-screen nature of the application, so I need to figure out how to get the query to open on top of the form (I know there is no popup). Or perhaps I could open the query behind the form, then somehow set the focus to the query before the mail merge?
If anyone has an idea for a macro/code please chime in.
Thanks.