Running Access Reports

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

Guest

How can I select from existing data when running reports? eg using a 'Combo
Box' or 'Drop-Down List'
 
Not sure what you are asking. All reports pull from existing data.

Are you asking how you can enter a paramaeter using a drop-down with the
valid choices?

If so, you would have to build a separate form with the combo -box and
reference that control in your report's query.

Look at the Northwinds database that comes with Access. most of those
reports use a parameter form.

Rick B
 
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.
 
Fredg:

Thank you for your reply!

I have written a financial system for our Boy Scout Troop. When I run a
report labeled 'Master Activity Report' I am asked the question, 'Which
Activity'. The 'Activity' data is located in the "Bank Activity' table in a
field named 'Discription'.

Right now I have to remenber exactly the format, spelling and spacing so
that I pull the correct records from the database.

I would like instead of the application asking 'Which Activity?', the system
to display a 'Combo Box' or 'Drop Down Box' whichever is appropriate
populated with the data already entered in the 'Discription' field.

I would then be able to highlight the one I want and the report would
automatically run.

I have researched and attempted to create a both a 'Combo Box' and a 'Drop
Down Box' to no avail.

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.
 
Back
Top