Form as report prompter

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

I have a report I want to open a form I have that is a
pulldown list of clients and then a start/end date field.
I want this form to open first so I can enter the
criteria before the report runs. I have a query setup as
well with the criteria as [Forms]![Clients]![Category],
but how do I tell the report to grab this form?

I can send the database to someone if they could help me.
 
Or, make a simple macro that runs the report, put a button
on the form that runs the macro. It's all easy point and
shoot stuff.
 
I have a report I want to open a form I have that is a
pulldown list of clients and then a start/end date field.
I want this form to open first so I can enter the
criteria before the report runs. I have a query setup as
well with the criteria as [Forms]![Clients]![Category],
but how do I tell the report to grab this form?

I can send the database to someone if they could help me.

In the report's Open Event:
DoCmd.OpenForm "FormName", , , , , acDialog

In the Report's Close Event:
DoCmd.Close acForm, "FormName"

On the form used to enter the parameters, add a command button.
Code It's Click event:
Me.Visible = False

When you open the Report, the report will first open the form. Enter
the parameters. When done, click the command button. The report will
display or print. When you close the report, the form will be closed.
 
Back
Top