Printing specific records from a Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have three reports that have the same record source (a query called
EmpandCourse). The three reports are:

Detail by Employee
Detail by Division
Courses

When a user chooses “Detail by Employee†I would like a dialog box to ask
the user to fill in the employee name. Then, the report will only show
records for that employee.

I would also like the same for “Detail by Division†whereby the user is
prompted to fill in the Division same, and the report will then show only
records for that Division.

How do I accomplish this? Do I need to build a separate query for each
report? By the way, these report choices are on a switchboard.

Thank you so much for your help!
 
If you are currently opening the reports from the standard switchboard built
by the wizard, you'll need to create a form instead. Add the parameter
field to the form. Add a button to the form to open the report. After the
wizard builds the code behind the button, open it in design view so you can
modify it. You will need to add a where argument to the OpenReport method.
This will cause the report to show only the specified record.
You can see syntax in help or just rely on intellisense as you modify the
code.
 
Back
Top