How do I get query criteria showing on report?

dmschulz1018

New Member
Joined
Jan 13, 2010
Messages
27
I am using Access 2010. I have built a report based on a query with date range criteria. This is so I can pull data for the report based any number of time frames needed and not have to update the query each time.

What I would like to do is somehow show the date range for that particular report in the report header each time it is run, no matter how many times I change the date range.

Of course I have the run date/time in the report footer. But it doesn't tell me the timeframe of the report.

It is not prudent to show all those dates on the report as space and length is being considered a premium for reducing paper cost/waste.

Any ideas on how to do this? I have searched several avenues I have available and have come up with nothing.

Thanks, Dawn
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Dawn

Is the date range criteria set using parameters?
 
Upvote 0
Norie,

It is set in the query on the criteria line for the date field as:

Between[Enter Start Date]And[Enter End Date]

So even though it is showing as parameters it is not actually built through the parameters application.

Hope this helps.

Thanks, Dawn
 
Upvote 0
Dawn

There's still parameters and you can refer to them in the report.

You can just refer to them by 'name'.

For example use this as the control source of a text control:

="From " & [Enter Start Date] & " to " & [Enter End Date]

If you need to format them you can use Format.
 
Upvote 0
Norie,

Thank you so much. That was perfect! Just what I needed.

Thanks again, Dawn

Hi Dawn and Norie,

I need the exact same thing done on my report, but after implementing Norie's suggestion of adding the text box and putting ="From " & [Enter Start Date] & " to " & [Enter End Date] in its control source, the report asks me for the Start and End Date twice. I suppose the first one is to run the query and the second to show it in the report. Can that not be consolodated so it just asks once.

Hassan
 
Upvote 0
Hello, I am having the same problem. If your report has a graph it will ask the date up to 4 times. Is there anyway to resolve this?
Hi Dawn and Norie,

I need the exact same thing done on my report, but after implementing Norie's suggestion of adding the text box and putting ="From " & [Enter Start Date] & " to " & [Enter End Date] in its control source, the report asks me for the Start and End Date twice. I suppose the first one is to run the query and the second to show it in the report. Can that not be consolodated so it just asks once.

Hassan
 
Upvote 0
If the report contains controls with the start and end dates you shouldn't get prompted, nor should you have to worry about retrieving parameters from anywhere. If you don't want to see these dates twice (once in the header as a textual date range and in the controls, which are also in the header) make them invisible.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top