If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"Parameter" Report
Hello,
I have a user who has 134 customers. He regularly uses two reports--one identifying sales invoiced and one identifying orders (sales not yet invoiced). He wants to look at these reports by customer. Basing the report on the parameter query is the obvious way to go--but he does not always remember the exact, precise customer name. So, I want to present him with a combo list so that he can choose one customer and preview the sales or order report for only that customer. He also wants to control the beginning and ending dates displayed on each report each time he runs it. Where should I look for help. Thanks for any and all suggestions you can provide. George M. |
#2
|
|||
|
|||
On Mon, 16 May 2005 16:32:31 GMT, George M. Fodor wrote:
Hello, I have a user who has 134 customers. He regularly uses two reports--one identifying sales invoiced and one identifying orders (sales not yet invoiced). He wants to look at these reports by customer. Basing the report on the parameter query is the obvious way to go--but he does not always remember the exact, precise customer name. So, I want to present him with a combo list so that he can choose one customer and preview the sales or order report for only that customer. He also wants to control the beginning and ending dates displayed on each report each time he runs it. Where should I look for help. Thanks for any and all suggestions you can provide. George M. 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 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 Report's Record Source [CompanyID] field criteria line write: forms!ParamForm!FindCompany 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 Company and the entry of the starting and ending dates wanted. Click the command button and then report will run. When the report closes, it will close the form. -- Fred Please only reply to this newsgroup. I do not reply to personal email. |
#3
|
|||
|
|||
On Mon, 16 May 2005 16:32:31 GMT, "George M. Fodor"
wrote: Hello, I have a user who has 134 customers. He regularly uses two reports--one identifying sales invoiced and one identifying orders (sales not yet invoiced). He wants to look at these reports by customer. Basing the report on the parameter query is the obvious way to go--but he does not always remember the exact, precise customer name. So, I want to present him with a combo list so that he can choose one customer and preview the sales or order report for only that customer. He also wants to control the beginning and ending dates displayed on each report each time he runs it. Where should I look for help. Thanks for any and all suggestions you can provide. It's convenient here to use a Form to collect the parameters. Let's say you have an unbound form named frmCrit, with a combo box cboCustomers (having the customer ID as the bound column), and text boxes txtFrom and txtTo. You can then base your Report on a query using criteria =[Forms]![frmCrit]![cboCustomers] on the CustomerID field (don't use customer names, you might have two customers who both happen to be named Bill Smith); and = CDate([Forms]![frmCrit]![txtFrom]) AND DateAdd("d", 1, [Forms]![frmCrit]![txtTo]) The DateAdd is intended to handle the case where your datefield contains a time portion. Put a command button on frmCRit to open the Report which you have based on this query. John W. Vinson[MVP] |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Populate report header field from query parameter | jh | Setting Up & Running Reports | 7 | November 13th, 2004 06:38 AM |
Still Hoping for help with a Query problem | Don Sealer | Using Forms | 15 | November 13th, 2004 06:24 AM |
Selecting No Parameter for a Report | MKE | Setting Up & Running Reports | 2 | November 3rd, 2004 06:55 PM |
Report Parameter Form | Murray | Using Forms | 2 | October 6th, 2004 11:43 AM |