Field Specific Report

  • Thread starter Thread starter MB
  • Start date Start date
M

MB

Hello MVPs.

I have a query that includes EmployeeName, Department,
CourseDate, CourseName to which I am using for a report.

I would like a separate report for each department. I
have the report in a switchboard so the user can click a
button, but I would like a dialog box to ask for the
Department name, first. The report would then be for
just that department.

I'm still new to Access, so I hope I explained this
clearly. I am using Access 2002.

Thank you!
 
Create a Form that allows the user to select a Department from a ComboBox,
and in VBA code use that selected information to construct the
WhereCondition argument of a DoCmd.OpenReport, which you use to print the
particular report for that deparment. The Query you use as the Report's
Record Source does not require any Criteria -- that will be supplied via the
WhereCondition.

If that's a little much for a "newcomer", you might consider just using the
text "[Enter Department]" in the Criteria line of the Query that you use as
the Report's RecordSource. That's harder on the user (has to type in the
Department, instead of selecting it) but easier on you.

Larry Linson
Microsoft Access MVP
 
Back
Top