Generating a Report on Specific User-Provided Criteria

G

Guest

Let me start this out by saying that I am basically an Access "newbie"

Ive made a relatively simple database to track repair workorders for my
company. It is comprised of two forms; One for Customer information which
has a subform tha displays a summary of a companies workorders and a second
form that has the specific workorder information. (This is also where the
workorder information is entered).

It is pretty simple to generate a report that shows all workorders sorted by
Customer Name or Customer ID, however, I want to be able to, easily, generate
a report for only a specific customer.

My goal is to have a button to generate the report. The user (Service
Coordinator, Technician, etc..) clicks on the button and is prompted for
"Company Name". The customer enters "City of XYZ" and the clicks enter and
Access generates a report showing a summary of all workorders for that
customer ONLY?

Can anyone provide me with some guidance?

Thanks!!
Dale
 
F

fredg

Let me start this out by saying that I am basically an Access "newbie"

Ive made a relatively simple database to track repair workorders for my
company. It is comprised of two forms; One for Customer information which
has a subform tha displays a summary of a companies workorders and a second
form that has the specific workorder information. (This is also where the
workorder information is entered).

It is pretty simple to generate a report that shows all workorders sorted by
Customer Name or Customer ID, however, I want to be able to, easily, generate
a report for only a specific customer.

My goal is to have a button to generate the report. The user (Service
Coordinator, Technician, etc..) clicks on the button and is prompted for
"Company Name". The customer enters "City of XYZ" and the clicks enter and
Access generates a report showing a summary of all workorders for that
customer ONLY?

Can anyone provide me with some guidance?

Thanks!!
Dale


Create an unbound form.
Add a combo box.
Set the Row Source of the combo box to include the
CustomerID field and the Customer Name.
Name the Combo Box 'FindCustomer'.
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 (that is the Report's Record Source) [CustomerID] field
criteria line write:
forms!ParamForm!FindCustomer

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 Customer.
Click the command button and then report will run.
When the report closes, it will close the form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top