Re: Cross-tab Criteria not evaluating



Here is a standard FAQ I have posted at Tek-Tips. You should be able to
change the solution to days rather than months.

===================
Try not to use "absolute" column headings for dates. You could possibly use
"relative" dates. For instance:
Form: frmA
Text Box: txtEndDate
Table: tblSales
Field: SaleDate
You want to show 12 months of sales in columns of a crosstab report.
Set the with menuing: Query|Parameter
Forms!frmA!txtEndDate Date/Time

Use this expression for your Column Headings:
ColHead:"Mth" & DateDiff("m",[SaleDate],Forms!frmA!txtEndDate)

This will produce Mth0, Mth1, Mth2, Mth3,... where Mth0 is sales from the
same month as the ending date on your form. Mth1 is the previous month etc.

Set your queries Column Headings property to:
"Mth0", "Mth1", "Mth2", "Mth3",.., "Mth11"
Build your report based on these "relative" months. If you need column
labels in your report, use text boxes with control sources of:
=DateAdd("m",0,Forms!frmA!txtEndDate)
=DateAdd("m",-1,Forms!frmA!txtEndDate)
=DateAdd("m",-2,Forms!frmA!txtEndDate)
=DateAdd("m",-3,Forms!frmA!txtEndDate)
...
This solution requires no code and will run fairly quickly.
===================

--
Duane Hookom
MS Access MVP
--

"Juan Schwartz" <jimmy.kirk@xxxxxxxxx> wrote in message
news:1136910328.638435.72430@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I did some searching around and found a post where you addressed that
> question. I have added it to the parameters and it seems to be working
> fine now with the exception of the report. I'm still very interested in
> how that would work. The set number is 7 for the columns.
>


.