Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PASSING QUERY PARAMETETS TO ACCESS REPORT

Status
Not open for further replies.

regava

Programmer
May 24, 2001
152
US
ACCESS 2000, WINXP
I have a query to print a report using ACCESS 2000. The query requires the user to enter two dates, and I would like to print those dates as part of the report. Is there a way to do it? Following is the query:

PARAMETERS [Enter Start FY] date,[Enter End FY] date;
SELECT Tax, Count(*) AS Total
FROM tblTRacking
WHERE (ClosedDate>=[Enter Start FY] and ClosedDate <= [Enter End FY])
GROUP BY Tax;


The query runs fine. All I need to know is how to access the two parameters in the Report. Thank for your help.
 
regava
In your report header, put an unbound text box, and put something such as the following (depending on what you want) as the control source for the text box...

="This report includes information for the time period between " & [Enter Start FY] & " " & [Enter End FY]

Be sure that you have the parameter expression precisely as you have them in your query, or you will end up being prompted for parameters twice.

Tom
 
Tom
Thank you for your help. It worked. I do appreciate your effort. Have a wonderfull day.

Regava
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top