L
Laurie
I have been trying to set up a report combo box based on the instructions
below that I got from a previous post. The name of my field that I want the
combo box based on is "MgrName". In the row source of the property box I put
the name of my field "MgrName" but the combo box comes up empty. Do I also
need to list each individual managers name in the row source as well?
Also, how do I set up the combo box to include an "All" choice. For
example, the user can either choose to run the report for one Manager or they
can choose to run it for all managers?
Thank you,
Thank you
--
Laurie
Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
ProviderID field and the Provider Name.
Name the Combo Box 'FindProvider'.
Set it's Bound column to 1.
Set it's Column Count property to 2.
Set the Column Width property to 0";1"
Also add 2 unbound text controls.
Set their format to a valid date format.
Name them "StartDate" and "EndDate"
Add a Command Button to the form.
Code the button's click event:
Me.Visible = False
Name this form 'ParamForm'.
In the Query that is the Report's Record Source, on the [ProviderID]
field criteria line write:
forms!ParamForm!FindProvider
As criteria in the query date field write:
Between forms!ParamForm!StartDate and forms!ParamForm!EndDate
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 Provider and the
entry of the starting and ending dates wanted.
Click the command button and the report will run.
When the report closes, it will close the form.
below that I got from a previous post. The name of my field that I want the
combo box based on is "MgrName". In the row source of the property box I put
the name of my field "MgrName" but the combo box comes up empty. Do I also
need to list each individual managers name in the row source as well?
Also, how do I set up the combo box to include an "All" choice. For
example, the user can either choose to run the report for one Manager or they
can choose to run it for all managers?
Thank you,
Thank you
--
Laurie
Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
ProviderID field and the Provider Name.
Name the Combo Box 'FindProvider'.
Set it's Bound column to 1.
Set it's Column Count property to 2.
Set the Column Width property to 0";1"
Also add 2 unbound text controls.
Set their format to a valid date format.
Name them "StartDate" and "EndDate"
Add a Command Button to the form.
Code the button's click event:
Me.Visible = False
Name this form 'ParamForm'.
In the Query that is the Report's Record Source, on the [ProviderID]
field criteria line write:
forms!ParamForm!FindProvider
As criteria in the query date field write:
Between forms!ParamForm!StartDate and forms!ParamForm!EndDate
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 Provider and the
entry of the starting and ending dates wanted.
Click the command button and the report will run.
When the report closes, it will close the form.