Run Queries with Macro 2

R

rdw1260

I have a form with several reports set to run by a single macro. The form
[View Grievance Reports] and macro [View Grievance Reports Macros]. The form
[View Grievance Reports] is unbounded. It has an unbounded list box that uses
a table [Grievance Reports Table] as the row source type. The Report based
macro works perfectly. I’m now trying to adapt this form and macro to open a
specific query when I either click or double click on the query listed on the
form. I can get the Query based macro to work only if I enter each query for
click and double click. When I do that all of the queries open as long as it
has been entered into the macro. A query listed on the form and not entered
in the macro will not open.

I know what is the difference between the actions [OpenQuery] and
[OpenReport]. The [OpenReport] action allows the Action Argument: Report
Name: =[Forms]![View Grievance Reports]![lstReports]. The [OpenQuery] allows
a single named query to open. Is there a way to adapt the report based macro
to work for queries and how?

Thanks for the assistance.

The Report macro is as follows:
Macro Name: cmdOpenReport : On Click Action: OpenReport
Action Argument: Report Name: =[Forms]![View Grievance Reports]![lstReports]
View: Print Preview
Window Mode: Normal

Macro Name: EditReportList : On Click Action: OpenForm
Action Argument: Form Name: Grievance Reports
View: Form
Window Mode: Dialog

Action: Requery
Action Argument: Control Name: lstReports

Macro Name: lstReports : On Dbl Click Action: OpenReport
Action Argument: Report Name: =[Forms]![View Grievance Reports]![lstReports]
View: Print Preview
Window Mode: Normal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top