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
|
|||
|
|||
group by query
I have a group by query that has a field InvoiceDate
I have the criteria of Between [Start Date] and [End Date] to prompt for the date range. The Total parameter is set to Where. I have the report that I want but I would like to pull this date range as a field in my report header. Something like My Report Date 06/01/09 - 06/30/09 How do I add this date range to the report header? gls858 |
#2
|
|||
|
|||
group by query
One approach (klunky kludge) would be to prompt in the query, then prompt
AGAIN in the report. Nope, I don't like it either! Another (more work, but less work each time you run the report) approach is to create a "report order form". In that form, add two unbound textboxes. Enter the Start and End date values in those two. Add a control button that opens the report. Modify your query to point to the form to get the parameters. Of course, your form has to be open and the controls filled for this approach to work. Regards Jeff Boyce Microsoft Office/Access MVP "gls858" wrote in message ... I have a group by query that has a field InvoiceDate I have the criteria of Between [Start Date] and [End Date] to prompt for the date range. The Total parameter is set to Where. I have the report that I want but I would like to pull this date range as a field in my report header. Something like My Report Date 06/01/09 - 06/30/09 How do I add this date range to the report header? gls858 |
#3
|
|||
|
|||
group by query
Add the prompts to the query, then use those fields in your report.
SELECT Field1, Field2, Field3, TransDate, [Start Date], [End Date] FROM MyTable WHERE TransDate BETWEEN [Start Date] AND [End Date] Now, in your report, you can refer to Me![Start Date] and Me![End Date] -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Jeff Boyce" wrote in message ... One approach (klunky kludge) would be to prompt in the query, then prompt AGAIN in the report. Nope, I don't like it either! Another (more work, but less work each time you run the report) approach is to create a "report order form". In that form, add two unbound textboxes. Enter the Start and End date values in those two. Add a control button that opens the report. Modify your query to point to the form to get the parameters. Of course, your form has to be open and the controls filled for this approach to work. Regards Jeff Boyce Microsoft Office/Access MVP "gls858" wrote in message ... I have a group by query that has a field InvoiceDate I have the criteria of Between [Start Date] and [End Date] to prompt for the date range. The Total parameter is set to Where. I have the report that I want but I would like to pull this date range as a field in my report header. Something like My Report Date 06/01/09 - 06/30/09 How do I add this date range to the report header? gls858 |
#4
|
|||
|
|||
group by query
Aha! I get it. If you add two new fields in your query, they'll be
available as fields in your report! Slick! Jeff "Douglas J. Steele" wrote in message ... Add the prompts to the query, then use those fields in your report. SELECT Field1, Field2, Field3, TransDate, [Start Date], [End Date] FROM MyTable WHERE TransDate BETWEEN [Start Date] AND [End Date] Now, in your report, you can refer to Me![Start Date] and Me![End Date] -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Jeff Boyce" wrote in message ... One approach (klunky kludge) would be to prompt in the query, then prompt AGAIN in the report. Nope, I don't like it either! Another (more work, but less work each time you run the report) approach is to create a "report order form". In that form, add two unbound textboxes. Enter the Start and End date values in those two. Add a control button that opens the report. Modify your query to point to the form to get the parameters. Of course, your form has to be open and the controls filled for this approach to work. Regards Jeff Boyce Microsoft Office/Access MVP "gls858" wrote in message ... I have a group by query that has a field InvoiceDate I have the criteria of Between [Start Date] and [End Date] to prompt for the date range. The Total parameter is set to Where. I have the report that I want but I would like to pull this date range as a field in my report header. Something like My Report Date 06/01/09 - 06/30/09 How do I add this date range to the report header? gls858 |
Thread Tools | |
Display Modes | |
|
|