Prompting Parameters in Reports

V

van_slanzar

I have a report based on a crosstab query. The crosstab query pulled data
from another query which broke up the records in months. I was wondering if
there is anyway to create a parameter where when you run the report it will
prompt you for a year to print out. This is because the report is a yearly
summary divided by 12 months. The report has records for only this year so
far and I have to consider the records that will be going in next year. I
want to be able to print out the yearly summary for 2005 and next year be
able to print out 2006 while still be able to print out 2005. If it helps the
query that split up the records into months used the DatePart function as
well as some random Year Expression it created. Any help would be greatly
appreciated.
 
A

Allen Browne

You can use a parameter in a crosstab query, as long as you declare it.

In query design view, choose Parameters from the Query menu.
Enter the parameter into the dialog, e.g.:
WotYear Long

In in the Criteria row under your date field, enter:
Between DateSerial([WotYear],1,1) And DateSerial([WotYear],12, 31)
 
Top