G
Guest
How can I select from existing data when running reports? eg using a 'Combo
Box' or 'Drop-Down List'
Box' or 'Drop-Down List'
How can I select from existing data when running reports? eg using a 'Combo
Box' or 'Drop-Down List'
fredg said:How can I select from existing data when running reports? eg using a 'Combo
Box' or 'Drop-Down List'
You haven't supplied a heck of a lot of information!
Let's say you want to display in your report, information about an
individual company.
Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
CompanyID field and the Company Name.
Name the Combo Box 'FindCompany'.
Set it's Bound column to 1.
Set the Column Width property to 0";1"
Add a Command Button to the form.
Code the button's click event:
Me.Visible = False
Name this form 'ParamForm'.
In the query (used as the Report's Record Source) [CompanyID] field
criteria line write:
forms!ParamForm!FindCompany
Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog
Code the report's Close event:
DoCmd.Close acForm, "ParamForm"
When ready to run the report, open the report.
The form will open and wait for the selection of the Company.
Click the command button and then report will run.
When the report closes, it will close the form.