Display Criteria from Query

kbreiss

Registered User.
Local time
Today, 20:56
Joined
Oct 1, 2002
Messages
228
Below I have a query that is the control source for my report. At the top of my report I would like to include the dates that were entered into the following query (Enter Start Date mm-dd-yy] AND [Enter End Date mm-dd-yy]). How can I get this to work where I can just take the inputed data from the query and place it in the text box on the report?

Thanks in advance,
Kacy

SELECT FACILITY.FAC_NAME, Count(*) AS Totals
FROM Archived INNER JOIN FACILITY ON Archived.FAC_ID = FACILITY.FAC_ID
WHERE (((Archived.APPT_DATE) BETWEEN [Enter Start Date mm-dd-yy] AND [Enter End Date mm-dd-yy]))
GROUP BY FACILITY.FAC_NAME;
________
FIX PS3
 
Last edited:
You need to create a Form to enter criteria ... have your query reference that form ... base your report on that query. Do a search on this forum for 'Print Query Criteria' or 'Query Parameter Report'. This is also addressed in Access Help under 'Reports, criteria to select data to include, Use a form to enter report criteria'

HTH
 
If you're using a parameter query to feed into the report, it's actually very easy to display the parameters on your report.

Let's say one of your query parameters was [Enter Start Date mm-dd-yy]. In your report, just place a text field somewhere on the report, and for the control source enter: =[Enter Start Date mm-dd-yy]. That's it!

You may want to be more descriptive in your report text box and include something like this: ="Start date: " & [Enter Start Date mm-dd-yy]. That way, you'll know what the parameter was for.
 
DCX693
I have tried this and now my report prompts me twice to enter the date. Any Idea ?
 
What is contained in the brackets [...] must be exactly the same. Having an extra space or mis-spelling will result in asking again.

Are you using my suggestion or dcx's?
 
DCX693

Thanks that is just what I was looking for!!!!

Thanks a bunch
R~
 

Users who are viewing this thread

Back
Top Bottom