On Tue, 10 Aug 2004 12:52:51 -0700, Jason wrote:
> 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.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
|