I have a report that generates information from different lawyers. I
don't wish to print out every single lawyer, or filter (SQL Query) a
certain criteira, is there a way that you can open a report and have a
pop up promt asking for a filter ?
You'll need to use a form to do this.
Let's assume it is a LawyerID number you need as criteria.
Make a new unbound form.
Add a combo box that will show the LawyerID field as well as the
LawyerName field.
Set the Combo Column Count property to 2.
If LawyerID is the first column, set the Column Width property to:
0";1"
Make sure the Combo Box Bound Column is the
LawyerID field.
Add a command button to the form.
Code the button's Click event:
Me.Visible = False
Name this form "ParamForm"
Code the Report's Record Source (a Query) LawyerID field's criteria
line:
forms!ParamForm!ComboBoxName
Code the Report's Open Event:
DoCmd.OpenForm "ParamForm" , , , , , acDialog
Code the Report's Close event:
DoCmd.Close acForm, "ParamForm"
Run the Report.
The report will open the form.
Find the Lawyer in the combo box.
Click the command button.
The Report will display just those records selected.
When the Report closes it will close the form.