I have a question regarding queries and the calendar control. Basically I have a two-step process involving a select query and then a cross-tab query that sums the results of the select query across time intervals (and a report eventually gets printed from this). On a form I have a calendar control and I would like the user to be able to select the dates between which they want to view data for the report. I can get this to work just fine linking the [Date] field in the select query to the calendar control by stating this in the criteria:
Between [Forms]![frmPtsSummaryDatePick]![BeginningDate] And [Forms]![frmPtsSummaryDatePick]![EndingDate]
However, the report that I eventually want to print is based on a crosstab query that summarizes the results from the above select query, and when I go to run the report/crosstab query I get this message:
"Runtime error '3070'
The microsoft Jet database engine does not recognize
'[Forms]![frmPtsSummaryDatePick]![BeginningDate] And [Forms]![frmPtsSummaryDatePick]![EndingDate]' as a valid field name or expression"
I can't really understand why the crosstab query won't work since it will work if you type in a criteria for [Date] in the select query as Like 4/*/06
Does anyone know of a work-around?
Thanks in advance.
That solved it! That saved many hours of frustration - I never knew that I had to enter in the entire "[Forms]![frmPtsSummaryDatePick].[BeginningDate] " into the parameters - I was trying to enter in [BeginningDate] alone.
I really appreciate allof your help!