Parameters for Reports

  • Thread starter Thread starter Bob Thomson
  • Start date Start date
B

Bob Thomson

Guest
I have a table that holds data with regard to customers. I have a report that displays information from this.

How do I prompt the user to type in a particular customer's name in order to display the info only applicable to them?

Any help, much appreciated.:rolleyes:
 
The easiest way would be to base your report on a parameter query. Create the query on every field neccessary from the table and under the CUSTOMER_NAME field add the parameter [Please enter customer name].
When the report is run, the query is activated and a small message box prompting them to enter the name will appear. Heres the catch, you may have to add additional code to prevent them from not entering a name which would return everything, or code to prevent them from mistyping the customer name.
You could always create a preemtive GUI the would step them into the process of opening the report, haveing them select the customer name from a combo/drop down list box, as well as any other criteria (date range) that you may wish to employ. This would be easier to control through code and ensure that only legitimate selections are made since only existing customer names will appear.
 
Advanced Parameter Queries

Implemented Jeremie's suggestion and it worked ok. Problem is, the users have to know the correct way the customer name is spelled in the customer table or it gives a null return.
Is there a way to let the users select the customer from a list and for this to be the basis of the parameter query?
 
You can create a form that contains a customer name dropdown. That way you won't need to worry about typo. Then, set the parameter on the query to forms!formname![Customer Name].

Hope this helps.

SHK
 

Users who are viewing this thread

Back
Top Bottom